why doesn't this work

Techy Geek

Daemon Poster
Messages
1,320
I'm trying to make a webpage in asp send an email, here is the code
<%
Set myMail=CreateObject("CDO.Message")
myMail.Subject="Sending email with CDO"
myMail.From="mymail@mydomain.com"
myMail.To="mymail@mydomain.com"
myMail.TextBody="This is a message."
myMail.Send
set myMail=nothing
%>

But it isn't working, cdont's dont work on my host (www.1asphost.com), but I figured this is a different system, right? Condensed:
1. Should this work?
2. If it should, then why doesn't it?
3. How would I make it do this when a button is clicked?

thanks in advance
 
CDONTS will not work on our servers because it requires the web server to be running SMTP, and we do not run mail services on our web servers, only on our mail servers. This is done for both performance and security reasons.

for the same reason CDONTS doesn't work, the CDO object won't work either...

you can't send messages from webpages because there is no mail server available on your host.
 
Back
Top Bottom