| Answer: |
By default, CDONTS doesn't support any sort of ReplyTo property... for the actual email it only has the To, From, Subject, Cc, Bcc, Importance and Body properties.
However, CDONTS does have a Value property that can be used to write headers to the email message. The Reply-To email header indicates an alternative email reply address (as opposed to the address of the email's sender). Therefore, the following line of code will create a reply to email address of bob@4GuysFromRolla.com:
CDONTSObjectInstance.Value("Reply-To") = "bob@4GuysFromRolla.com"
|
Pretty neat, eh? Below is a full example of sending an email and setting the Reply-To parameter as we did above:
<% Dim objCDO Set objCDO = Server.CreateObject("CDONTS.NewMail")
objCDO.To = "mitchell@4guysfromrolla.com" objCDO.From = "info@4guysfromrolla.com" objCDO.Value("Reply-To") = "scott@4guysfromrolla.com" objCDO.Subject = "test" objCDO.Body = "test" objCDO.Send
set objCDO = nothing %>
|
When the recipient (mitchell@4guysfromrolla.com) of the above email attempted to reply to the email, the reply would be sent to scott@4guysfromrolla.com as opposed to info@4guysfromrolla.com!
For more information on CDONTS be sure to check out the technical documentation. You may also wish to check out the technical docs for the Value property.
Happy Programming! |