ASP & CDO (Not CDONTS)
I am trying to use the default Outlook profile as a portal to our exchange server on another portion of our network. I have found references to it all over the internet but nothing says how to do it.
I did get a variation of this code to work in Access as a vb Module. When I try to use it in ASP it just results in a script timeout.
<?php
<%
Set objOutlook = Server.CreateObject(\"Outlook.Application\")
Set objOutlookMsg = objOutlook.CreateItem(olMailItem)
With objOutlookMsg
.To = \"[email protected]\"
.Subject = \"Testing Subject\"
.HTMLBody = \"This is the <b>Body</b>\"
.TextBody = \"This is the Text Body\"
.ReplyTo = \"[email protected]\"
.Organization = \"Art Inc.\"
End With
objOutlookMsg.Save
objOutlookMsg.Send
Set objOutlook = Nothing
Set objOutlookMsg = Nothing
?>
?>
Thanks for any help.
Peter J. Boettcher posted this at 15:02 — 14th February 2002.
They have: 812 posts
Joined: Feb 2000
You'll have to make sure you have Outlook installed on the machine the ASP page is running on and that Outlook is configured properly for the IUSR_machinename account. To make sure try logging onto the machine as IUSR_machinename and using Outlook to send an email.
PJ | Are we there yet?
pjboettcher.com
Peter J. Boettcher posted this at 15:20 — 14th February 2002.
They have: 812 posts
Joined: Feb 2000
Forgot to mention, if you're just sending mail then skip the Outlook portion entirely and just use CDO, it will be a lot simplier and more efficient.
PJ | Are we there yet?
pjboettcher.com
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.