compile error

here is the code i'm trying to compile...
using mscorlib.dll;
using System.dll;
using System.Web.Mail;
using System.Web.dll;

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 !

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!