Cannot get IIS pickup directory

Discussion in 'ASP .Net' started by =?Utf-8?B?TWlrZQ==?=, Aug 27, 2007.

  1. 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
     
    =?Utf-8?B?TWlrZQ==?=, Aug 27, 2007
    #1
    1. Advertising

  2. On Aug 27, 10:10 am, Mike <> 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...://wss3.agileer.com/Lists/Posts/AllPosts.aspx
     
    Alexey Smirnov, Aug 27, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Steven Cheng[MSFT]

    RE: Sending multiple e-mails. Pickup Directory?

    Steven Cheng[MSFT], Oct 21, 2004, in forum: ASP .Net
    Replies:
    6
    Views:
    551
    =?Utf-8?B?Z3N3aXR6?=
    Dec 10, 2004
  2. =?Utf-8?B?U2FtdWVs?=

    System.Web.Mail and Pickup Directory

    =?Utf-8?B?U2FtdWVs?=, Jan 14, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    534
    Steven Cheng[MSFT]
    Jan 17, 2005
  3. Phil Di Guillielmo
    Replies:
    6
    Views:
    8,361
    Aaron J. Scott
    Aug 27, 2003
  4. carmelo

    Writing into the Pickup directory

    carmelo, Jul 3, 2008, in forum: ASP .Net
    Replies:
    2
    Views:
    479
  5. Alan Howard
    Replies:
    2
    Views:
    1,902
    Alan Howard
    Jul 5, 2004
Loading...

Share This Page