Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP & Microsoft Exchange Server

Status
Not open for further replies.

damann

Technical User
Jul 19, 2000
114
US
I've been given a project and I am thinking of using the two together somehow, but don't know how as yet. First though, I would just like to know if it's possible to use the two together, if so can someone give me a simple example?


Thank you,
Damann
 
damann,,

Here is an exhange example--its uses CDO for Exchange objects:

it will create the session and logon -get flolder, add a new message,add new receipent

<!--MetaData type=&quot;typelib&quot; name=&quot;Microsoft CDO 1.21 Library&quot; UUID=&quot;3fa7de7-6438-101b-acc1-00aa00423326&quot;-->

<%
Option Explicit

Dim objSession, objOutbox, objMessage, objRecipients, objRecipient
Dim strPorfileOnfo, strServer, strMailbox, strTo, strSubject, strBody
%>

<html>
<head>
<title> CDO for exchange example</title>
<head>
<body>
<%
strTo = request.querystring(&quot;recipient&quot;)
strSubject = request.querystring(&quot;subject&quot;)
strBody = request.querystring(&quot;body&quot;)

set objSession = server.createobject(&quot;MAPI.session&quot;)

strserver =&quot;xx&quot;
strmailbox = &quot;xx&quot;
strprofileinfo = strserver + vbLF + strmailbox

objsession.logon &quot;&quot;, &quot;&quot;, false, true, 0, true, strprofileinfo

set objoutbox = objsession.outbox
set objmessage = objoutbox.messages.add
set objrecipients = objmessage.recipients
set objrecipient = obhrecipients.add

objrecipient.name = strto
objrecipient.resolve
objmessage.subject = strsubject
objmessage.text = strbody
objmessage.send

set all to nothing
%>
you have just sent an admin alert to <% = strto %>.

etc etc

if you need exchange 2000 then you use cdo 3.0 as the library

I hope this helps

Aaron
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top