G
Guest
Hi Guys,
I'm using this code to send an email with attachment but it's not working !!
So, what I'm missing!!? knowing that both From & To email addresses are
correct?
MailMessage msgMail = new MailMessage();
msgMail.To = "(e-mail address removed)";
msgMail.From = "(e-mail address removed)";
msgMail.Subject = "Attachment Test";
msgMail.BodyFormat = MailFormat.Text;
msgMail.Body = "Check out the attachment!";
msgMail.Attachments.Add(new MailAttachment("c:\\report.pdf"));
SmtpMail.Send(msgMail);
Response.Write("Email was queued to disk");
Thanks
I'm using this code to send an email with attachment but it's not working !!
So, what I'm missing!!? knowing that both From & To email addresses are
correct?
MailMessage msgMail = new MailMessage();
msgMail.To = "(e-mail address removed)";
msgMail.From = "(e-mail address removed)";
msgMail.Subject = "Attachment Test";
msgMail.BodyFormat = MailFormat.Text;
msgMail.Body = "Check out the attachment!";
msgMail.Attachments.Add(new MailAttachment("c:\\report.pdf"));
SmtpMail.Send(msgMail);
Response.Write("Email was queued to disk");
Thanks