MAPI.Profile Logon with ASP

A

Adam Kinney

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
 
J

John Blessing

Adam Kinney said:
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
 
L

Lee Derbyshire

Adam Kinney said:
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
___________________________________
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top