Ciao a tutti,
sto provando a implementare un form e-mail che permetta di ricevere un messaggio sulla casella di posta. Il seguente codice pero' mi da' eccezione SMTPException , premetto che ho una casella tiscali.it e non conosco bene nč la porta ne l'SMTP.
codice:
string to = "receiver@tiscali.it";
string from = email.Text;
MailMessage message = new MailMessage(from, to);
message.Subject = tbName.Text +": Richiesta Informazioni"; //tbname č la mail del mittente
message.Body = txtAtrea.Text; //txtAtrea il testo del messaggio
SmtpClient client = new SmtpClient();
client.EnableSsl = true;
client.Port = 25;
client.DeliveryMethod = SmtpDeliveryMethod.Network;
client.Host = "smtp.tiscali.it"; client.UseDefaultCredentials = true;
try
{
client.Send(message);
}
catch{....}
Grazie
Mike "The Ram"