R
Ray
Hi
Can anyone help with something that has beaten me.
I am sending an email with an attachment, as per below. If I comment out the
MailAttachment line then the mail gets sent, but with it in I get an error.
Can anybody point me in the right direction?
Thanks
Ray
MailMessage MyMail = new MailMessage();
string txt="this is my attachment";
MailAttachment MyAttachment = new MailAttachment(txt);
SmtpMail.SmtpServer = server;
SmtpMail.Send(MyMail);
Can anyone help with something that has beaten me.
I am sending an email with an attachment, as per below. If I comment out the
MailAttachment line then the mail gets sent, but with it in I get an error.
Can anybody point me in the right direction?
Thanks
Ray
MailMessage MyMail = new MailMessage();
string txt="this is my attachment";
MailAttachment MyAttachment = new MailAttachment(txt);
SmtpMail.SmtpServer = server;
SmtpMail.Send(MyMail);