RE: ASP and CDONTS
by Matthew Ohlman <matthew(at)ohlman.com>
|
Date: |
Tue, 25 Jun 2002 12:23:59 -0500 |
To: |
Joellyn Whitehead <JWhitehead(at)ilchildcare.org>, hwg-basics(at)hwg.org |
|
todo: View
Thread,
Original
|
|
Joellyn, and Bert! Thanks so much for your replies. Actually, my problem
was that I was using JavaScript validation code, and it was interfering. I
think it did this because I had it to start validation using OnSubmit, so I
think it kept it from working right. Thanks again.
Matthew
At 08:23 AM 6/25/02 -0500, Joellyn Whitehead wrote:
>Hi Matthew,
>
>I had that problem too when I tried to use CDONTS. Do you have Exchange on
>the same box as your web server? CDONTS needs the SMTP service to work and
>our tech guy told me that because we have Exchange server on the same box as
>our web server he couldn't (or wouldn't?) set up the SMTP service. So I
>used a different method....
>
><.% set objSession = nothing
>set objNewMessage = nothing
>set objFolderOutbox = nothing
>set objRecipient = nothing
>strServer = "servername" ' Name of your server
>strMailbox = "mailbox" ' Mailbox alias
>strProfileInfo = strServer + vbLF + strMailbox
>Set objSession = Server.CreateObject("MAPI.Session")
>objSession.Logon "", "", False, True, 0, True, strProfileInfo
>Set objFolderOutbox = objSession.Outbox
>Set objNewMessage = objFolderOutbox.Messages.Add
>objNewMessage.Subject="Subject here"
>objNewMessage.Text="Message body here"
>Set objRecipient = objNewMessage.Recipients.Add("someone(at)something.com")
>objRecipient.Type = 1
>objRecipient.Resolve
>objNewMessage.send
>.%>
>
>Unfortunately, I can't tell you why this works and have never taken the time
>to find out why! (I just grabbed the code from MSDN I think.) If you're
>not able to get any resolution with that CDONTS issue, try this out and see
>if it will work for you.
>
>Joellyn
>
>-----Original Message-----
>From: Matthew Ohlman [mailto:matthew(at)ohlman.com]
>Sent: Monday, June 24, 2002 4:57 PM
>To: hwg-basics(at)hwg.org
>Subject: ASP and CDONTS
>
>
>Hi list. Sorry this may be off topic, but I hope everyone is doing well. I
>have wrote an ASP script, that involves CDONTS. Here is my code:
>
>-----------------------
><.%
>
> Dim objMail
> Set objMail = CreateObject("CDONTS.NewMail")
>
>objMail.To = "ohlman(at)ohlman.com"
>objMail.From = request.form("email")
>objMail.Subject = "Web Design Offer"
>objMail.Body = request.form("comments")
>objMail.send
>
>If err THEN
> response.write err.description
>else
> response.write ("Mail sent")
>
>end if
>%.>
>------------------------------
>
>OK. It works great if I take out the request.form("email") and
>request.form("comments"), and just replace them with text (with quotes).
>But when I try it with the code above it doesn't give me an error, and it
>says mail sent, but it just doesn't arrive in my inbox. If somebody could
>give me some help or point me in the right direction, it would be greatly
>appreciated. Thanks in advance.
>
>Matthew
>
>
>
>| Matthew Ohlman
>| Ohlman Pages
>| http://www.ohlman.com/
>"There's a difference between a philosophy and a bumper sticker. "
> Charles M. Schulz
| Matthew Ohlman
| Ohlman Pages
| http://www.ohlman.com/
"There's a difference between a philosophy and a bumper sticker. "
Charles M. Schulz
HTML: hwg-basics mailing list archives,
maintained by Webmasters @ IWA