Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
here is the code i'm trying to compile...
System.Web.Mail.MailMessage mail = new MailMessage(); [b] //<-------MailMessage is giving me a CS10116 Error[/b]
mail.To = "[email protected]
mail.From = "[email protected]
mail.Subject = "this is a test email.";
mail.Body = "this is my test email body.";
MailAttachment attachment = new MailAttachment( Server.MapPath( "C: emp est.txt" ) ); //create the attachment
mail.Attachments.Add( attachment ); //add the attachment
SmtpMail.SmtpServer = "your server here"; //your real server goes here
SmtpMail.Send( mail );[/blue]
i'm tryingto create a e-mail sent from the command line to be sent automatically with the default mail program.if you can get it to work, go ahead and send a message to the above e-mail in the code and state that it works. thanks for the help all !
0 · ·