Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
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 February 24th, 2005, 12:34 PM
Friend of Wrox
Points: 8,019, Level: 38
Points: 8,019, Level: 38 Points: 8,019, Level: 38 Points: 8,019, Level: 38
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2005
Location: Mauchline, East Ayrshire, Scotland
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to crmpicco Send a message via AIM to crmpicco Send a message via MSN to crmpicco Send a message via Yahoo to crmpicco
Default send an email to someone automatically

How do i send an email to someone automatically if a condition is reached?

Can this be done with ASP?

Picco

www.crmpicco.co.uk
__________________
_______________________
Ayrshire Minis - a Mini E-Community
http://www.ayrshireminis.com
http://www.crmpicco.co.uk
 
Old February 24th, 2005, 01:18 PM
Friend of Wrox
Points: 2,473, Level: 20
Points: 2,473, Level: 20 Points: 2,473, Level: 20 Points: 2,473, Level: 20
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2004
Location: India
Posts: 642
Thanks: 0
Thanked 43 Times in 42 Posts
Default

yes u can send email automatically....

u can use CDONTS to send email

Om Prakash
 
Old February 24th, 2005, 06:19 PM
Friend of Wrox
Points: 6,664, Level: 34
Points: 6,664, Level: 34 Points: 6,664, Level: 34 Points: 6,664, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

For further information throw 'cdonts example' in google - there is a feast of information about this.
NOTE : The smtp service must be enabled

dim myMail,mssge
set myMail = server.createObject("CDONTS.NewMail")
myMail.body = "message string"
myMail.From = "greatRugbyTeam@AllBlacks.co.nz"
myMail.To = "someAddress@somePlace.com"
myMail.Subject = "SomeText"
myMail.importance = 2
myMail.BodyFormat = 0
myMail.send
set myMail = nothing

Wind is your friend
Matt
 
Old February 25th, 2005, 05:33 AM
Friend of Wrox
Points: 8,019, Level: 38
Points: 8,019, Level: 38 Points: 8,019, Level: 38 Points: 8,019, Level: 38
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2005
Location: Mauchline, East Ayrshire, Scotland
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to crmpicco Send a message via AIM to crmpicco Send a message via MSN to crmpicco Send a message via Yahoo to crmpicco
Default

I put that in a new asp file but get error:

Error Type:
Server object, ASP 0177 (0x800401F3)
Invalid class string
/picco/smtp.asp, line 11

Line 11:

set myMail = server.createObject("CDONTS.NewMail")

www.crmpicco.co.uk
 
Old February 25th, 2005, 06:24 AM
Friend of Wrox
 
Join Date: Oct 2003
Location: colombo, WP, Sri Lanka.
Posts: 479
Thanks: 0
Thanked 3 Times in 3 Posts
Send a message via MSN to surendran Send a message via Yahoo to surendran
Default

hi,
are you using xp?
pls try this code

<%
Dim MyMail
Set MyMail = Server.CreateObject("CDO.Message")
MyMail.From = "justme@myaddress.com"
MyMail.To = "friend1@address1.com;friend2@address2.com"
MyMail.Cc = "friend3@address3.com;friend4@address4.com"
MyMail.Bcc = "friend5@address5.com;friend6@address6.com"
MyMail.Subject = "Sending Mail via CDOSYS for Windows 2000/XP"
MyMail.TextBody = "Sending email with CDOSYS Message " &_
     "objects is easy! Try it!"
MyMail.AddAttachment "c:pathsmiley.gif"
MyMail.Fields("urn:schemas:httpmail:importance").V alue = 2;
MyMail.Fields.Update()
MyMail.Send()
Set MyMail = Nothing
%>


surendran
(Anything is Possible)
 
Old February 25th, 2005, 06:41 AM
Friend of Wrox
Points: 8,019, Level: 38
Points: 8,019, Level: 38 Points: 8,019, Level: 38 Points: 8,019, Level: 38
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2005
Location: Mauchline, East Ayrshire, Scotland
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to crmpicco Send a message via AIM to crmpicco Send a message via MSN to crmpicco Send a message via Yahoo to crmpicco
Default

Got a new error:

Error Type:
Microsoft VBScript compilation (0x800A0401)
Expected end of statement
/picco/smtp.asp, line 21, column 58
MyMail.Fields("urn:schemas:httpmail:importance").V alue = 2;



www.crmpicco.co.uk
 
Old February 25th, 2005, 07:48 AM
Friend of Wrox
Points: 8,019, Level: 38
Points: 8,019, Level: 38 Points: 8,019, Level: 38 Points: 8,019, Level: 38
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2005
Location: Mauchline, East Ayrshire, Scotland
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to crmpicco Send a message via AIM to crmpicco Send a message via MSN to crmpicco Send a message via Yahoo to crmpicco
Default

yes i am using WinXp Pro

www.crmpicco.co.uk
 
Old February 25th, 2005, 07:49 AM
Friend of Wrox
Points: 8,019, Level: 38
Points: 8,019, Level: 38 Points: 8,019, Level: 38 Points: 8,019, Level: 38
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2005
Location: Mauchline, East Ayrshire, Scotland
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to crmpicco Send a message via AIM to crmpicco Send a message via MSN to crmpicco Send a message via Yahoo to crmpicco
Default

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<%
Dim MyMail
Set MyMail = Server.CreateObject("CDO.Message")
MyMail.From = "crmpicco@aol.com"
MyMail.To = "crmpicco@hotmail.com;crmpicco@lycos.com"
MyMail.Cc = "crmpicco@excite.com;crmpicco@myownemail.com"
MyMail.Bcc = "cjmpicco@aol.com;pwsteven@yahoo.co.uk"
MyMail.Subject = "Sending Mail via CDOSYS for Windows 2000/XP"
MyMail.TextBody = "Sending email with CDOSYS Message " &_
     "objects is easy! Try it!"
MyMail.AddAttachment "c:pathsmiley.gif"
MyMail.Fields("urn:schemas:httpmail:importance").V alue = 2;
MyMail.Fields.Update()
MyMail.Send()
Set MyMail = Nothing
%>

</body>
</html>

Thats all my code. SMTP is running in my services.

But i get this error:

Error Type:
Microsoft VBScript compilation (0x800A0401)
Expected end of statement
/picco/smtp.asp, line 20, column 58
MyMail.Fields("urn:schemas:httpmail:importance").V alue = 2;


www.crmpicco.co.uk
 
Old February 26th, 2005, 09:45 PM
Friend of Wrox
Points: 6,664, Level: 34
Points: 6,664, Level: 34 Points: 6,664, Level: 34 Points: 6,664, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

does CDONTS not run on XP

Wind is your friend
Matt
 
Old March 3rd, 2005, 03:10 AM
Authorized User
 
Join Date: Dec 2004
Location: Multan, Punjab, Pakistan.
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to shankhan Send a message via Yahoo to shankhan
Default

CDONTS will work. If u have installed Win 2000 Pro on any PC, copy the file CDONTS.dll from its system32 folder and then copy this file to ur Win XP system32 folder and register this DLL file. Command to register this file is, click on run and write there regsvr32 cdonts.dll
hope fully it will solve ur problem.

Zeeshan





Similar Threads
Thread Thread Starter Forum Replies Last Post
Open link automatically in email collie HTML Code Clinic 2 May 28th, 2008 09:57 PM
send mail automatically surendran PHP How-To 1 September 21st, 2007 06:34 AM
How to send mail for each week/month automatically lakshmi_annayappa ASP.NET 1.0 and 1.1 Professional 1 May 25th, 2007 02:43 AM
send email automatically with classic asp crmpicco Classic ASP Professional 6 July 4th, 2006 09:56 AM
send an email to someone automatically crmpicco VB How-To 1 February 25th, 2005 08:59 AM





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