On Aug 27, 10:10 am, Mike <M...@discussions.microsoft.com> wrote:
> Hi guys,
>
> I'm using this code to generate emails and it's working in my machine:
>
> // Create the mail message
> MailMessage objMailMsg = new MailMessage(strFrom, strTo);
> objMailMsg.BodyEncoding = Encoding.UTF8;
> objMailMsg.Subject = strSubject;
> objMailMsg.Body = strMsg;
> Attachment at = new Attachment(Server.MapPath(AttachmentPath));
>
> objMailMsg.Attachments.Add(at);
> objMailMsg.Priority = MailPriority.High;
> objMailMsg.IsBodyHtml = true;
> //prepare to send mail via SMTP transport
> SmtpClient objSMTPClient = new SmtpClient();
> objSMTPClient.DeliveryMethod =
> SmtpDeliveryMethod.PickupDirectoryFromIis;
> objSMTPClient.Send(objMailMsg);
>
> But, doing the same thing in other machine(having VS.Net express) the
> program is giving me this error:"Cannot get IIS pickup directory"
> what could the problem.
>
> Thanks
>
> --
> Regards,
> M.Rochdi
http://wss3.agileer.com/Lists/Posts/...llPosts%2Easpx