First find the System.Web.dll in your computer drive where .NET Framework installed
Then add a reference to that dll in your C# windows application.
then write following code to send email....
string smtpServer;
smtpServer= "127.0.0.1";
System.Web.Mail.MailMessage msg = new System.Web.Mail.MailMessage();
msg.From = "From Email Address";
msg.To = "To Email Address";
msg.Body = "Body here";
System.Web.Mail.MailAttachment attachFile = new System.Web.Mail.MailAttachment("Filepath");
System.Web.Mail.SmtpMail.SmtpServer = smtpServer; System.Web.Mail.SmtpMail.Send(msg);
Friday, June 8, 2007
Got this error:
ReplyDeleteThe server rejected the sender address. The server response was: 530 5.7.0 Must issue a STARTTLS command first. z4sm18664799ibg.13
Any suggestions?