Article ID: 178390
Article Last Modified on 5/2/2006
objSess.Logon "", "", False, True, 0, True, "exchangeServerName" & vbLF & "exchangeE-MailName"
<%@ LANGUAGE="VBSCRIPT" %>
<HTML>
<BODY LANGUAGE=VBS>
<%
Const cStrServer = "<a valid Exchange Server name>"
Const cStrMailbox = "<a valid Mailbox Alias>"
bstrProfileInfo = cStrServer & vbLf & cStrMailbox 'insert a line feed
Set objSess = Server.CreateObject("mapi.session") 'create session
objSess.Logon "", "", False, True, 0, True, bstrProfileInfo
Set objFBMess = objSess.Outbox.Messages.Add
objFBMess.Subject = "Test Active Messaging"
objFBMess.Text = "Greetings from Active Messaging in ASP"
Set objRecips = objFBMess.Recipients
objRecips.Add ("someone@microsoft.com") ' e-mail name to send message to
objRecips.Resolve
objFBMess.Send
objSess.Logoff
%>
Mail Sent.
</BODY>
</HTML>
objSess.Logon "", "", False, True, 0, True, bstrProfileInfo
to:
objSess.Logon "dustin hubbard", "", False, True, 0, True
This CODE tries to use an existing profile that does not exist, thus
generating the "MAPI_E_LOGON_FAILED" error.
Additional query words: Active Messaging Logon Failed ActMsg OleMsg
Keywords: kbwebserver kbprb KB178390