Ciao ragazzi, ho creato un pgm che dovrebbe inviare una mail utilizzando telnet e il protocollo smtp...
la mail viene inviata usando il seguente code:
ma alla fine ricevo sempre questo errore:codice:Private Sub cmdInvia_Click() On Error Resume Next 'CONTROLLO DEI CAMPI If (txtMittente = "" Or txtDestinatario = "" Or txtTesto = "" _ Or txtPorta = "" Or txtServer = "") Then MsgBox "Uno o più campi obbligatori non sono stati " _ & "compilati!", vbCritical, "Errore!" Else 'CONNESSIONE AL SERVER Winsock.RemoteHost = txtServer Winsock.RemotePort = txtPorta Winsock.Connect Winsock.SendData "telnet vallauri1 25" aspetta "220" Winsock.SendData "HELO " & "Pippo" & vbCrLf aspetta "250" Winsock.SendData "MAIL FROM: " & txtMittente & vbCrLf aspetta "250" Winsock.SendData "RCPT TO: " & txtDestinatario & vbCrLf aspetta "250" Winsock.SendData "DATA" & vbCrLf & "subject:" _ & txtOggetto & vbCrLf & txtTesto & vbCrLf aspetta "354" Winsock.SendData txtTesto & vbCrLf & "." & vbCrLf aspetta "250" Winsock.SendData "QUIT" & vbCrLf aspetta "221" Winsock.Close 'CONTROLLO ERRORI If (Err.Number = 0) Then MsgBox "Messaggio Inviato con Successo!", _ vbInformation, "Messaggio inviato" Else MsgBox "Impossibile inviare il messaggio!" & vbCrLf _ & "Si è verificato un'errore!", _ vbCritical, "Impossibile Inviare" MsgBox Err.Description End If End If End Sub
sapete aiutarmi????protocollo o stato della connessione errato per la translazion richiesta o la richiesta![]()

Rispondi quotando
