Wrox Programmer Forums
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old December 28th, 2004, 08:21 AM
Friend of Wrox
Join Date: May 2004
Posts: 105
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to send e-mails???

Hello Everybody...

While searching the web for "ASP send e-mails" I `ve found so many referenses about that. All of them are saying that it`s so easy to send e-mails (just a few lines of code)!!!

But none of them is working for me unfortunattely!
I`m using IIS 5.1 on WinXP Pro.
I `ve already installed SMTP Server and running.

So... what`s the problem?

One of those easy ways I tried is the following code:
Set myMail=CreateObject("CDO.Message")
myMail.Subject="Sending email with CDO"
myMail.TextBody="This is a message."

The error was: The Value of parameter "SendUsing" is not valid.

Any ideas??? Thank you in advance!
Old December 28th, 2004, 09:10 PM
Friend of Wrox
Join Date: Sep 2003
Posts: 363
Thanks: 0
Thanked 1 Time in 1 Post


  It doesn't seems any error. Or try this

set mymail=server.createobject("CDONTS.NewMail")
mymail.subject="mail subject"
mymail.to="to email"
mymail.from="from email"
mymail.body="body of the mail"

set mymail=nothing


Old December 30th, 2004, 09:34 AM
Friend of Wrox
Join Date: May 2004
Posts: 105
Thanks: 0
Thanked 0 Times in 0 Posts

Unfortunatelly this script is also not workning! :~(

Is there a possibility that I`m missing any .dll files???
Old December 30th, 2004, 08:30 PM
Friend of Wrox
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41


Are you getting any specific error? the mail code is very simple stuff and your's looks correct to me.

;;;Is there a possibility that I`m missing any .dll files???

If this was the case I believe you would be getting one of two errors:
1..'Invalid class string' = SMTP service is not installed
2..'failure to create object error' = You no not have CDONTS available to you or you have a syntax error in your code where you create the mail object.

Check out this FAQ at Imar's site (Mr ASP): http://Imar.Spaanjaars.Com/QuickDocId.aspx?QUICKDOC=249

Wind is your friend
Old December 31st, 2004, 03:42 AM
Friend of Wrox
Join Date: May 2003
Posts: 229
Thanks: 0
Thanked 0 Times in 0 Posts

There is one good FAQ on this topic can be found on the following address


Charul Shukla

Similar Threads
Thread Thread Starter Forum Replies Last Post
Error when i send mails ssomchai BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 3 May 7th, 2008 03:44 AM
Send URL request to send sms via NowSMS deco BOOK: Professional VB 2005 ISBN: 0-7645-7536-8 0 February 16th, 2008 02:45 PM
Send e-mails to multiple recipients using database misskaos Classic ASP Basics 6 October 17th, 2006 11:09 PM
send & recive mails from exchange & lotus sever zaheersharief Pro VB 6 1 May 16th, 2005 06:55 AM
Get mails tsimsha Classic ASP Basics 1 November 16th, 2004 03:11 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.