sending email simple question
Hi,
I got this script for sending emails from asp from an online tutorial (can't recall from what URL).
I tried to run it, and I don't get any error message but I don't recieve any email at the target email either.
any ideas why ?
maybe I should do something else besides running this script?
here it is:
<%
Set myMail=CreateObject("CDO.Message")
myMail.Subject="Sending email with CDO"
myMail.From="[email protected]"
myMail.To="[email protected]"
myMail.TextBody="This is a message."
myMail.Send
set myMail=nothing
Response.Redirect "thanks.html"
%>
Re: sending email simple question
looks ok to me, is the email address correct and is it possible its still on route? The code above is correct, talk to your web host, maybe its somethign they have set
Re: sending email simple question
I send it yesterday to gmail account, so I don't think its still on route...
they say everything is working ok at their side.
Re: sending email simple question
the script appears fine, maybe the email was blocked by a junk filter?
Re: sending email simple question
I talked with the hosting again, and now they said I need to put a configuration script. I tried that, and now I get "page cannot be displayed"...
Re: sending email simple question
configuration script? i hope you mean the schema.. if not, then you can try getting the schema from microsoft.. :D sorry for such a short reply.. i'm in a bit of a rush right now.. :D sorry...
Re: sending email simple question
example ..
Code:
Dim objMessage
Dim objConfig
Dim Flds
Set objMessage = CreateObject("cdo.message")
Set objConfig = CreateObject("cdo.configuration")
Set Flds = objConfig.Fields
Flds.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
Flds.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "localhost"
Flds.Update
Set objMessage.Configuration = objConfig
objMessage.From = FROMADDRESS
objMessage.To = TOADDRESS
objMessage.Subject = TOSUBJECT
'// objMessage.TextBody = "Test"
objMessage.HTMLBody = "<b>Test</b>"
objMessage.Fields.Update
objMessage.Send
Set objMessage = Nothing
Set objConfig = Nothing
Re: sending email simple question
check with ur hosting service provider, they may have installed CDO component, but not sure with CDO.message, if they won't confirm then write here again i will send you a script to confirm all the installed components at server side. If they havnt installed the CDO.message then you can may find CDO.Newmail, if its there, then simply replace CDO.message with CDO.newmail with some extra code that u may need. If you need complete code then u can ask.
Re: sending email simple question
I believe you are right. however, I'm afraid this service provider staff cannot answer this (they lack the knowledge). I'd appricieate if you could send me the testing code for both cdo.message and for cdo.newmail at server side.
thanks,
Re: sending email simple question
I tried to paste the code init, but forum has limitation regarding length of message, so full code cannot be uploaded here. If you just email me from your account than i will send this code by email as attachment.
Re: sending email simple question
what is your email please?
Re: sending email simple question
got it. I just sent you an email with my email address,
thanks,
Re: sending email simple question
Re: sending email simple question
please zip it and send again (it has been blocked)
thanks,
Re: sending email simple question
hi, could you help me in how to create a very good databases??
Re: sending email simple question
Hi please mention wat sort of databases u r tryin for, intranet applications or for internet applications. Access, mysql or mssql?