Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CDONTS clarification

Status
Not open for further replies.

LaPluma

Programmer
Feb 3, 2002
139
DE
Hello

I am writing for a little clarification.

Below is an example CDONTS script for sending e.mail. If I want to send a copy of the e.mail message (sent to the Webmaster by the visitor) to the visitor - in the way autoresponders might work - can I simply use:

ObjCDOMail.CCTo = Request.Form("copy")

.....and would the name of the input box on the form need to be called 'copy'?

Many thanks in advance.

La Pluma



<%
Response.Buffer = True
Dim ObjCDOMail, strMsg

strMsg=&quot;Thank you for contacting whoever. We will review your requirements, and contact you within 24 hours with a quote. &quot;& vbcrlf & vbcrlf _
&&quot;Best wishes &quot;& vbcrlf & vbcrlf _
&&quot;whatever&quot;

Set ObjCDOMail = Server.CreateObject(&quot;CDONTS.NewMail&quot;)

ObjCDOMail.From = Request.Form(&quot;strFrom&quot;))
ObjCDOMail.To = Request.Form(&quot;email&quot;)
ObjCDOMail.Subject = &quot;whatever&quot;
ObjCDOMail.Body = strMsg
ObjCDOMail.BodyFormat = 0
ObjCDOMail.MailFormat = 0
ObjCDOMail.Importance = 1
ObjCDOMail.Send
Set ObjCDOMail = Nothing
%>
 
I believe the property is actually CC instead of CCTo, and no, you can feed it any string you want, whether it comes from a Request.Form or you enter it on the spot:
Code:
objCDOMail.CC = &quot;spongebob@pineapple.underthesea.com&quot;

Hope this helps,
-Tarwn

spongebob_dance.gif
________________________________________________________________________________
Want to get great answers to your Tek-Tips questions? Have a look at faq333-2924
 
Hello Tarwn and TonyU

Many thanks for your reply. That's fine.

Best wishes

laPluma
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top