| | |
Sending e-mail in ASP
Please support our ASP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Dec 2006
Posts: 14
Reputation:
Solved Threads: 0
I got this script from one ASP tutorial (click here to see it):
replaced mymail@mydomain.com and someone@somedomain.com with
2 mail addresses of two mail-boxes that I have on www.yahoo.com and
uploaded this script (as an .asp file) on a free asp-supported remote
server. Then I tried to open the link to this file in my web browser (IE6) -
nothing happened (only got an HTTP 500 page) - and when I checked
my mailbox, I didn't find any new e-mail there. What did I do wrong or
what did I not do?
asp Syntax (Toggle Plain Text)
<% Set myMail=CreateObject("CDO.Message") myMail.Subject="Sending email with CDO" myMail.From=mymail@mydomain.com myMail.To=someone@somedomain.com myMail.TextBody="This is a message." myMail.Sendset myMail=nothing %>
replaced mymail@mydomain.com and someone@somedomain.com with
2 mail addresses of two mail-boxes that I have on www.yahoo.com and
uploaded this script (as an .asp file) on a free asp-supported remote
server. Then I tried to open the link to this file in my web browser (IE6) -
nothing happened (only got an HTTP 500 page) - and when I checked
my mailbox, I didn't find any new e-mail there. What did I do wrong or
what did I not do?
Last edited by peter_budo; Dec 29th, 2008 at 11:37 am. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
•
•
Join Date: Dec 2006
Posts: 14
Reputation:
Solved Threads: 0
Strange, I thougnt this script was using CDOSYS. I took this
script from here: www.w3schools.com/asp/asp_send_email.asp
and look what they said there right before presenting this script:
"...Microsoft has discontinued the use of DONTs on
Windows 2000, Windows XP and Windows 2003.
If you have used CDONTs in your ASP applications,
you should update the code and use the new CDO
technology.
Examples using CDOSYS
Sending a text e-mail: ..."
and then my script follows. Are you sure it is still using CDONT?
If yes, what CDOSYS script do I need to be able to send mails
in ASP?
script from here: www.w3schools.com/asp/asp_send_email.asp
and look what they said there right before presenting this script:
"...Microsoft has discontinued the use of DONTs on
Windows 2000, Windows XP and Windows 2003.
If you have used CDONTs in your ASP applications,
you should update the code and use the new CDO
technology.
Examples using CDOSYS
Sending a text e-mail: ..."
and then my script follows. Are you sure it is still using CDONT?
If yes, what CDOSYS script do I need to be able to send mails
in ASP?
Last edited by Vladimirr; Dec 22nd, 2008 at 4:21 am.
Ooops my bad i only say a few lines and just assumed it was CDONTS.
If your getting a 500 error, you need to turn off Friendly HTTP Error Messages and stop using IE
If your getting a 500 error, you need to turn off Friendly HTTP Error Messages and stop using IE
•
•
Join Date: Dec 2007
Posts: 113
Reputation:
Solved Threads: 17
on what you posted, you need quotes around the email addresses:
Also, this is not right:
myMail.Sendset
The "Set" should be on the start of the next line:
>>uploaded this script (as an .asp file) on a free asp-supported remote server
>>>CDO.Message.1error '80040220'
The "SendUsing" configuration value is invalid.
Do you know if the server is running a local smtp server? Most likely it is NOT. On the tutorial page you posted, you basically need to use the last example, but you need to modify:
"smtp.server.com"
with the value of the appropriate smtp server. Contact your webhost and ask them what is their smtp address. As documented on the comment of that example:
'Name or IP of remote SMTP server
you can use either an IP address OR a domain name.
ASP Syntax (Toggle Plain Text)
myMail.From="mymail@mydomain.com" myMail.To="someone@somedomain.com"
Also, this is not right:
myMail.Sendset
The "Set" should be on the start of the next line:
ASP Syntax (Toggle Plain Text)
myMail.Send Set myMail=nothing
>>uploaded this script (as an .asp file) on a free asp-supported remote server
>>>CDO.Message.1error '80040220'
The "SendUsing" configuration value is invalid.
Do you know if the server is running a local smtp server? Most likely it is NOT. On the tutorial page you posted, you basically need to use the last example, but you need to modify:
"smtp.server.com"
with the value of the appropriate smtp server. Contact your webhost and ask them what is their smtp address. As documented on the comment of that example:
'Name or IP of remote SMTP server
you can use either an IP address OR a domain name.
![]() |
Similar Threads
- CDOSYS Error (ASP)
- sending e-mail with ASP (ASP)
- Auto Mail in ASP.NET (ASP.NET)
- Email Sending Problem in ASP.NET (ASP.NET)
- problem in sending mail form web application (ASP.NET)
Other Threads in the ASP Forum
- Previous Thread: E Card system
- Next Thread: How to call asp function in anchor tag
| Thread Tools | Search this Thread |
archive asp asp.net aspandmssqlserver2005 aspandmssqlserver2005connection aspconnection connection database databaseconnection dreamweaver excel fso iis msmsql mssql2005 mssqlserver2005 mssqlserver2005andasp mssqlserverandasp opentextfile record searchbox selectoption single specfic sqlserver sqlserverconnection windows7





