MAPI.Profile Logon with ASP

Discussion in 'ASP General' started by Adam Kinney, Feb 10, 2004.

  1. Adam Kinney

    Adam Kinney Guest

    I have an ASP application that logs into Exchange server to send email. The
    code looks like this:

    Set objSession = CreateObject("MAPI.Session")
    objSession.Logon "profileName"

    strMsg = ".."
    Set objMessage = objSession.Outbox.Messages.Add
    objMessage.Subject = "Customer Comment"
    objMessage.Text = strMsg

    Set objRecip = objMessage.Recipients.Add
    objRecip.Name = SendTo
    objRecip.Type = 1 'CdoTo
    objRecip.Resolve

    objMessage.Send 'showDialog:=False
    objSession.Logoff

    This code worked fine when the server was WinNT / Exchange 2000, now the
    server has been upgraded to Windows 2003 and Exchange 2003.

    Exchange Server is running on the same machine as IIS. And the error
    appears to happen when the Logon is attempted.

    Any ideas as to what may have changed in Windows 2003 or Exchange 2003?

    Thanks,

    Adam Kinney
    www.adamkinney.com
     
    Adam Kinney, Feb 10, 2004
    #1
    1. Advertising

  2. "Adam Kinney" <> wrote in message
    news:%...
    > I have an ASP application that logs into Exchange server to send email.

    The
    > code looks like this:
    >
    > Set objSession = CreateObject("MAPI.Session")
    > objSession.Logon "profileName"
    >
    > strMsg = ".."
    > Set objMessage = objSession.Outbox.Messages.Add
    > objMessage.Subject = "Customer Comment"
    > objMessage.Text = strMsg
    >
    > Set objRecip = objMessage.Recipients.Add
    > objRecip.Name = SendTo
    > objRecip.Type = 1 'CdoTo
    > objRecip.Resolve
    >
    > objMessage.Send 'showDialog:=False
    > objSession.Logoff
    >
    > This code worked fine when the server was WinNT / Exchange 2000, now the
    > server has been upgraded to Windows 2003 and Exchange 2003.
    >
    > Exchange Server is running on the same machine as IIS. And the error
    > appears to happen when the Logon is attempted.
    >
    > Any ideas as to what may have changed in Windows 2003 or Exchange 2003?
    >
    > Thanks,
    >
    > Adam Kinney
    > www.adamkinney.com
    >



    Hello Adam

    I don't recommend you use MAPI. This is a client interface and will show
    modal dialogs if it runs into problems, and of course, there is no one sat
    at your webserver waiting to click "OK".

    Use CDONTS or better yet one of the smtp components (some of which are free)

    --
    John Blessing

    http://www.LbeHelpdesk.com - Help Desk software priced to suit all
    businesses
    http://www.free-helpdesk.com - Completely free help desk software !
    http://www.lbetoolbox.com - Remove Duplicates from MS Outlook
     
    John Blessing, Feb 11, 2004
    #2
    1. Advertising

  3. "Adam Kinney" <> wrote in message
    news:%...
    > I have an ASP application that logs into Exchange server to send email.

    The
    > code looks like this:
    >
    > Set objSession = CreateObject("MAPI.Session")
    > objSession.Logon "profileName"
    >
    > strMsg = ".."
    > Set objMessage = objSession.Outbox.Messages.Add
    > objMessage.Subject = "Customer Comment"
    > objMessage.Text = strMsg
    >
    > Set objRecip = objMessage.Recipients.Add
    > objRecip.Name = SendTo
    > objRecip.Type = 1 'CdoTo
    > objRecip.Resolve
    >
    > objMessage.Send 'showDialog:=False
    > objSession.Logoff
    >
    > This code worked fine when the server was WinNT / Exchange 2000, now the
    > server has been upgraded to Windows 2003 and Exchange 2003.
    >
    > Exchange Server is running on the same machine as IIS. And the error
    > appears to happen when the Logon is attempted.
    >
    > Any ideas as to what may have changed in Windows 2003 or Exchange 2003?
    >
    > Thanks,
    >
    > Adam Kinney
    > www.adamkinney.com


    What error are you seeing?

    Lee.

    --
    ___________________________________

    Outlook Web Access for PDA and WAP:
    www.leederbyshire.com
    email a@t leederbyshire d.0.t c.0.m
    ___________________________________
     
    Lee Derbyshire, Feb 11, 2004
    #3
    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. Pat Sinnott
    Replies:
    0
    Views:
    1,256
    Pat Sinnott
    Jul 7, 2003
  2. Suganthi

    Mapi Logon problem

    Suganthi, Jul 21, 2003, in forum: C++
    Replies:
    1
    Views:
    2,451
    Jack Klein
    Jul 21, 2003
  3. Andy B
    Replies:
    0
    Views:
    520
    Andy B
    May 3, 2008
  4. Kjell Kristiansson
    Replies:
    0
    Views:
    288
    Kjell Kristiansson
    Nov 30, 2005
  5. Jeff Miller

    MAPI Logon

    Jeff Miller, Mar 26, 2008, in forum: Ruby
    Replies:
    3
    Views:
    350
    Jeff Miller
    Mar 27, 2008
Loading...

Share This Page