Una volta funzionava tutto ora non si sa perchè non funziona più... La cosa bella è che mi ritorna un bel "unknow error" e non capisco quale sia la causa.
Codice:
codice:
string corpo = "pippo";
System.Web.Mail.SmtpMail.SmtpServer="ppp.qqq.it";
// messaggio e-mail
MailMessage msg = new MailMessage();
msg.BodyFormat = MailFormat.Html;
msg.From = "lll@fff.com";
msg.To = "lll@fff.it";
msg.Subject = "Statistiche";
msg.Body = corpo;
// invio del messaggio
SmtpMail.Send(msg);
lblErrore.Text="Invio andato a buon fine";
Errore:
codice:
Unknown Error
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Runtime.InteropServices.COMException: Unknown Error
Source Error:
Line 115: msg.Body = corpo;
Line 116: // invio del messaggio
Line 117: SmtpMail.Send(msg);
Line 118:
Line 119: lblErrore.Text="Invio andato a buon fine";