sending an email

G

Giulio

Hi, I use this code to send an email:

System.Web.Mail.MailMessage myMail = new
System.Web.Mail.MailMessage();
myMail.Subject = "Mail di prova.";
myMail.Body = "Questa è una mail di test.";
myMail.To = "Tizio ";
myMail.From = "(e-mail address removed)";
//SmtpMail.SmtpServer = "mailserver";
SmtpMail.Send(myMail);

but it send nothing... even when I decomment the server
line.
Someone should tell me what I need to do?
 
I

Ignacio Machin \( .NET/ C# MVP \)

Hi,

You need to have a SmtpServer , unless that you have a local smtp server
configured. I would also suggest you that the To be a FQ mail address.

Cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

Hi, I use this code to send an email:

System.Web.Mail.MailMessage myMail = new
System.Web.Mail.MailMessage();
myMail.Subject = "Mail di prova.";
myMail.Body = "Questa è una mail di test.";
myMail.To = "Tizio ";
myMail.From = "(e-mail address removed)";
//SmtpMail.SmtpServer = "mailserver";
SmtpMail.Send(myMail);

but it send nothing... even when I decomment the server
line.
Someone should tell me what I need to do?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top