Dave,

My apologies for misinterpreting your original request. The following information from 
the MSDN Library should be of help:

One common header, Reply-To, is used to allow the To field to be auto populated when 
the user clicks Reply. The following code snippet illustrates populating the To field: 

objMsg.Value("Reply-To")=strReplyTo

Here's an example that illustrates advanced CDO features like the ability to copy, 
blind-copy, use a reply-to address, send file attachments, set the message format 
type, and specify the encoding method. As you can see, a form was used to collect the 
required information:

<%
Dim objMsg, strFrom, strTo, 
strCc, strBcc, strReplyTo, strBody, _
 strSubject, strFileName
Dim lngImportance, lngMsgFormat, 
lngMsgEncode, lngAttEncode

strFrom = Trim(Request.Form("txtFrom"))
strTo = Trim(Request.Form("txtTo"))
strCc = Trim(Request.Form("txtCc"))
strBcc = Trim(Request.Form("txtBcc"))
strReplyTo = Trim(Request.Form("txtReplyTo"))
strSubject = Trim(Request.Form("txtSubject"))
strBody = Trim(Request.Form("txtMessage"))
lngImportance = Trim(Request("optImportance")) 
lngMsgFormat = Trim(Request("optMsgType"))
lngMsgEncode = Trim(Request("optMsgEncode"))
lngAttEncode = Trim(Request("optAttEncode"))
strFileName = Trim(Request.Form("txtattfile"))

Set objMsg = Server.CreateObject("CDONTS.NewMail")
If Len(Trim(strReplyTo)) > 0 Then
 objMsg.Value("Reply-To")=strReplyTo
End If

objMsg.From = strFrom
objMsg.To = strTo
objMsg.Cc = strCc
ObjMsg.Bcc = strBcc
objMsg.Subject = strSubject
objMsg.Importance = lngImportance
objMsg.BodyFormat = lngMsgFormat
objMsg.MailFormat = lngMsgEncode
objMsg.Body = strBody
If Len(Trim(strFileName)) > 0 Then
 objMsg.AttachFile strFileName, , lngAttEncode
End If

objMsg.Send 
Set objMsg = Nothing

%>

HTH,
Dina

----- Original Message ----- 
From: Dave Jones 
To: CF-Talk 
Sent: Friday, March 29, 2002 1:01 PM
Subject: Re: CDONTS and ReplyTo header


>Try <cfset objNewMail.To = "[EMAIL PROTECTED]">

Dina,
Thanks for the reply, but I believe this sets the To: address of 
the email (i.e. the address to which the email is sent). I'm 
trying to find a way to set the Reply-To header so that any 
replies to the mailing are directed to the Reply-To value rather 
than the From: value.

Dave



>   ----- Original Message -----
>   From: Dave Jones
>   To: CF-Talk
>   Sent: Thursday, March 28, 2002 11:29 AM
>   Subject: CDONTS and ReplyTo
>
>
>   Can someone tell me how to set the Reply-To header when using
>   CDONTS in ColdFusion? These assignments do NOT work:
>
>   <cfset objNewMail.ReplyTo = "[EMAIL PROTECTED]">
>   <cfset objNewMail.Reply_To = "[EMAIL PROTECTED]">
>   <cfset objNewMail.Value("Reply-To") = "[EMAIL PROTECTED]">
>
>   Thanks,
>   Dave Jones
>   NetEffect
>
>
>

______________________________________________________________________
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to