|
-
Mar 15th, 2001, 12:35 AM
#1
Thread Starter
Junior Member
anyone has a working example of how cdont work?
thanxs
-
Mar 15th, 2001, 04:32 AM
#2
Fanatic Member
Hi LoverPal
Using CDONTS in asp is quite easy, just use the following code
Code:
Set objCDOMail = Server.CreateObject("CDONTS.NewMail")
'set its properties
objCDOMail.From = 'Email address that you want it from
objCDOMail.To = 'who you want to send it to
objCDOMail.Subject = 'any string
objCDOMail.Body = 'anystring
'send the mail
objCDOMail.Send
'set the object = nothing
Set objCDOMail = Nothing
Hope it helps
Ian
Yeah, well I'm gonna build my own lunar space lander! With blackjack aaaaannd Hookers! Actually, forget the space lander, and the blackjack. Ahhhh forget the whole thing!
-
Mar 16th, 2001, 06:59 AM
#3
JavaScript
Here is an example for the JavaScript and or JScript.
Code:
var oMail;
// get a mail object
oMail = Server.CreateObject ( 'CDONTS.NewMail' );
oMail.From = sFromEmail;
oMail.To = sToEmail;
oMail.Bcc = sBccEmail;
oMail.Importance = 1;
// if you want HTML mail...
// uncomment the next two lines
// oMail.BodyFormat = 0;
// oMail.MailFormat = 0;
// if you want to attach a file...
// uncomment the next line
// oMail.AttachFile ( 'c://autoexec.bat' );
oMail.Subject = sSubject;
oMail.Body = sBody;
// send it
oMail.Send ();
-
Mar 16th, 2001, 01:14 PM
#4
Member
anyone know how to forward?
I would like to use the built in SMTP server that comes with windows 2k Server but it won't forward emails to other email addresses.
I was thinking that it might be possible since when u create users in the Active Dir, there's a field for email address.
How can I get the SMTP server to send mail to that email field??
if its not possible the way win 2k server comes, any recommendations to begin coding?
-
Mar 16th, 2001, 01:42 PM
#5
Lively Member
Hi,
If you are having Win2k, then u can use CDO object to
configure SMTP server.
.....
objMessage = Server.CreateObject("CDO.Message")
Set objConfiguration = Server.CreateObject("CDO.Configuration")
Set colFields = objConfiguration.Fields
colFields(cdoSendUsingMethod) = cdoSendUsingPort
colFields(cdoSMTPServer) = "Your Mail Server"
colFields(cdoSMTPConnectionTimeout) = 10
colFields(cdoSMTPAuthenticate) = cdoAnonymous
sonia
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|