Wrox Programmer Forums
|
ASP CDO As of Oct 5, 2005, this forum is now locked. No posts have been deleted. Please use "Classic ASP Professional" at: http://p2p.wrox.com/forum.asp?FORUM_ID=56 for discussions similar to the old ASP Pro Code Clinic or one of the other many remaining ASP and ASP.NET forums here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP CDO section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 28th, 2003, 01:02 PM
Registered User
 
Join Date: Oct 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default CDO MAPI from VB.net to Exchange 5.5

I am developing an app to send MAPI mail from vb.net. I must send MAPI and not SMTP, as many of the junior managers in my company do not get SMTP mail addresses.

After a week of experimentation and advice, I finally got past a multitude of error messages but still have a problem. I get past the Logon ok, but when I hit the following line to start a message (see below), it simply hangs indefinititely. Is there something that must be set up on the Exchange 5.5 box? Is there a log file on the Exchange box where I can see what is happening? Here is the code:

' start the session
Dim objsession As Object
objsession = CreateObject("mapi.session")
Dim profileinfo As String
profileinfo = "exchangeserver" & vbLf & "mailboxalias"

objsession.Logon("", "", False, True, 0, True, profileinfo)

' start the message
Dim objmessage As Object
objmessage = objsession.Outbox.Messages.Add '<==== HANGS HERE ======
objmessage.subject = "This is a test."
objmessage.Text = "This is the message text."

' add receipients
Dim objRecipients = objmessage.Recipients
objRecipients = objmessage.Recipients.Add
objRecipients.add("RecipientAlias")

' check for valid recipient
objRecipients.Resolve()

'Send the message
objmessage.Send()

'Logoff
objsession.Logoff()
objsession = Nothing

Any assistance would be greatly appreciated.

 
Old November 4th, 2003, 03:58 AM
Registered User
 
Join Date: Nov 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

MAPI is not supported in a .NET Framework environment.

Click here for more details:Kool
http://support.microsoft.com/default...b;en-us;813349





Similar Threads
Thread Thread Starter Forum Replies Last Post
CDO - MAPI - Email - AddressBook Access Question HyperVirus Pro Visual Basic 2005 0 November 1st, 2007 05:49 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.