ASP / Send Mail Question

D

dthmtlgod

I am having an e-mail being sent from a form submitting on a web page.

Right now, it is just a generic name (not a valid e-mail address) in the
Mail From box. "Web Server Request". How can I add a reply to piece to
this, so when a user clicks on Reply, it sends it to a valid e-mail address.

Thank you
 
R

Ray Costanzo [MVP]

Are you on an NT server? If not, you should be using CDO instead of CDONTS.
http://www.aspfaq.com/show.asp?id=2026 But, either way, you can set the
..From field as Curt suggested or set the Reply-To address of either mail
object.

CDONTS:

oYourCDONTSMailObject.Value("Reply-To") = "(e-mail address removed)"

CDO:

oYourCDOMailObject.ReplyTo = "(e-mail address removed)"

Ray at work
 
F

frmrsrs

Thanks

Ray Costanzo said:
Are you on an NT server? If not, you should be using CDO instead of CDONTS.
http://www.aspfaq.com/show.asp?id=2026 But, either way, you can set the
.From field as Curt suggested or set the Reply-To address of either mail
object.

CDONTS:

oYourCDONTSMailObject.Value("Reply-To") = "(e-mail address removed)"

CDO:

oYourCDOMailObject.ReplyTo = "(e-mail address removed)"

Ray at work
 
D

dthmtlgod

Ray, so should this work? The replyto isn't taking. Message does send OK.

<!--
METADATA
TYPE="typelib"
UUID="CD000000-8B95-11D1-82DB-00C04FB1625D"
NAME="CDO for Windows 2000 Library"
-->
<%
Set cdoConfig = CreateObject("CDO.Configuration")

With cdoConfig.Fields
.Item(cdoSendUsingMethod) = cdoSendUsingPort
.Item(cdoSMTPServer) = "EXCSERV01"
.Update
End With

Set cdoMessage = CreateObject("CDO.Message")


With cdoMessage
Set .Configuration = cdoConfig
.From = "Automation_Server"
.To = "(e-mail address removed)"
.Subject = "Sample CDO Message"
.TextBody = "This is a test for CDO.message"
.Replyto = "(e-mail address removed)"
.Send
End With
 
R

Ray Costanzo [MVP]

What "isn't taking" about it? If you receive the message, then your ASP
code should be fine. Are you saying that when you reply to the message, it
is not addressed to your reply-to account? Are both of those e-mail
accounts defined in your Exchange server? What I mean is that where I am, I
have multiple e-mail SMTP e-mail addresses setup for myself on my Exchange
server. So, if I set a reply-to address to be one of my alternate e-mail
accounts, Outlook will still resolve that address to be "Costanzo, Ray" when
I go to reply. To test accurately, I'd have to set a reply-to address of
(e-mail address removed).

Ray at work
 
R

Ray Costanzo [MVP]

That I did not catch.

Yes, in order for the SMTP server to be willing to send your message, at
least as far as MS SMTP, you need a valid .From address. You can do that as
"Automation Server <[email protected]>" if you still want the "Automation
Server" to appear as the name.

The .ReplyTo is only necessary if you want the .From not to be the .ReplyTo.
If .ReplyTo is not specified, .From is what will be replied to.

Ray at work
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top