PDA

View Full Version : CDO email doesn't seem to get sent


pedroponting
05-10-2006, 07:12 AM
I'm trying to send an email alert to an address, informing someone that a new message has been posted on a site that they need to respond to. Very easy, one would think, since the message is always the same. Code is simply this:
if err<>0 then
Response.Redirect("ask_question.asp?error=other")
else
Set myMail=CreateObject("CDO.Message")
myMail.Subject="New question for Roofi"
myMail.From="NOREPLY@embracethefuture.org.au"
myMail.To="projectofficer@embracethefuture.org.au"
myMail.HTMLBody = "A new question has been posted on the Embrace the Future Resilient Kids site. <a href=""http://www.embracethefuture.org.au/kids/admin.asp"">Click here</a> to view."
myMail.Send
set myMail=nothing
Response.Redirect("ask_question.asp?error=none")
end if

That comes after the bit that appends the message to the server database. err is 0 if the append was successful. I'm sure this code is fine, so why don't I receive an email when a message has been posted? Could it be my webhost doesn't permit CDO email or something? (I haven't asked them) Or is there something else I am missing?
Cheers.
pp

pedroponting
05-10-2006, 08:49 AM
Seems to be working now. Weird. Oh well...