Click to See Complete Forum and Search --> : why won't this fire off an e-mail?


sanjuT
08-16-2004, 11:47 AM
Set objCDOMail = Server.CreateObject("CDONTS.NewMail")
objCDOMail.To = "a@b.com" 'the destination
objCDOMail.From = "a@b.com" 'the sender
txtbody = ""
objCDOMail.Subject = "Broadcast Requirements for " & EventTitle
txtbody = message & newline & newline & BroadcastReq & newline & AccBroadcast
txtbody = txtbody & txtURL
objCDOMail.Send 'fire off the email
set objCDOMail = nothing

lmf232s
08-16-2004, 12:11 PM
hey snajuT, your code is fine and works correctly.
I cut and pasted into my project to test it and it works fine.

Your server may not be set up to send mail like this. You are using SMPT by using this method and your server may not be set up or be able to do it. Not sure exactly why and im sure other people could explain better.

Do a google search.

But as far as your code goes. it is correct and it does work.

sanjuT
08-16-2004, 12:13 PM
THANKS!!

I'll research why i am having problems.