E
Ed Sutton
How can I show the email client UI so the user can send the attachment
to the desired recipient. I get an exception if I leave the
MailMessage.To property blank. Is there any way to do this?
I found a Microsoft example that uses mapi32.dll that can do this. But
I can nopt make the SmtpMail work like I want.
Thanks in advance,
-Ed
Using System.Web.Mail;
MailMessage mailMsg = new System.Web.Mail.MailMessage();
mailMsg.To = "(e-mail address removed)"; // Throws exception if left blank
mailMsg.From = "(e-mail address removed)";
mailMsg.Subject = "Hello";
mailMsg.Body = "My body";
mailMsg.Attachments.Add(new MailAttachment(fileAttachment));
SmtpMail.Send(mailMsg);
to the desired recipient. I get an exception if I leave the
MailMessage.To property blank. Is there any way to do this?
I found a Microsoft example that uses mapi32.dll that can do this. But
I can nopt make the SmtpMail work like I want.
Thanks in advance,
-Ed
Using System.Web.Mail;
MailMessage mailMsg = new System.Web.Mail.MailMessage();
mailMsg.To = "(e-mail address removed)"; // Throws exception if left blank
mailMsg.From = "(e-mail address removed)";
mailMsg.Subject = "Hello";
mailMsg.Body = "My body";
mailMsg.Attachments.Add(new MailAttachment(fileAttachment));
SmtpMail.Send(mailMsg);