Reply to topic
ASPmail
Groll


Joined: 23 Dec 2004
Posts: 27
Reply with quote
In aspmail, does anyone know how to get the mail FROM field to reflect what the user enters in their email field so that all I have to do is hit REPLY and it goes straight back to the email address that they listed?
Josh
Forum Regular

Joined: 01 Apr 2004
Posts: 1029
Location: Felton, Delaware
Reply with quote
Care to display your code?
followup
Groll


Joined: 23 Dec 2004
Posts: 27
Reply with quote
Basically, I need this field in the aspmail.asp file: Mailer.FromAddress= "" to display the field in my form that I have labeled as 'Email'

Is it something like this?

Mailer.FromAddress= "Request.QueryString("Email")"

So when the user of the form enters their email address, it comes to me with the 'from' field as whatever they input into the Email field....
ssuhmann


Joined: 18 Jun 2004
Posts: 14
Location: HostMySite.com
Reply with quote
You could add their name to the reply to address.

http://www.aspemail.com/manual_object.html#AddReplyTo

This would allow you to reply to them depending on how your software works.
Josh
Forum Regular

Joined: 01 Apr 2004
Posts: 1029
Location: Felton, Delaware
Reply with quote
*kicks Scott* You beat me to it!!!

hey man I'm gonna call you soon - we'll go get some SledgeHammers Very Happy
Groll


Joined: 23 Dec 2004
Posts: 27
Reply with quote
still slightly confused...where does this tag go? In the form, or the aspmail instructions?

Sub AddReplyTo(Address As String, Optional Name)
Adds an email address and optionally the corresponding full name to the message's Reply-To: list. This method can be called multiple times per message.

Code:
<%
Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
Mailer.FromName = ""
Mailer.FromAddress= "THIS IS WHAT I WANT TO CHANGE BASED ON THEIR INPUT OF EMAIL ADDRESS"
Mailer.RemoteHost = ""
Mailer.AddRecipient ""
Mailer.Subject = "New Form Submission"
strMsgHeader = "Form information follows" & vbCrLf
for each qryItem in Request.Form
  strMsgInfo = strMsgInfo & qryItem & " - " & request.Form(qryItem) & vbCrLf
next
strMsgFooter = vbCrLf & "End of form information"
Mailer.BodyText = strMsgHeader & strMsgInfo & strMsgFooter
if Mailer.SendMail then
  Response.Redirect "thankyou.asp"
else
  Response.Write "Mail send failure. Error was " & Mailer.Response
end if
set Mailer = Nothing
%>
Josh
Forum Regular

Joined: 01 Apr 2004
Posts: 1029
Location: Felton, Delaware
Reply with quote
wouldn't it be like this?

Code:

<%
Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
Mailer.FromName = ""
Mailer.FromAddress= Address  <=======================
Mailer.RemoteHost = ""
Mailer.AddRecipient ""
Mailer.Subject = "New Form Submission"
strMsgHeader = "Form information follows" & vbCrLf
for each qryItem in Request.Form
  strMsgInfo = strMsgInfo & qryItem & " - " & request.Form(qryItem) & vbCrLf
next
strMsgFooter = vbCrLf & "End of form information"
Mailer.BodyText = strMsgHeader & strMsgInfo & strMsgFooter
if Mailer.SendMail then
  Response.Redirect "thankyou.asp"
else
  Response.Write "Mail send failure. Error was " & Mailer.Response
end if
set Mailer = Nothing
%>
Groll


Joined: 23 Dec 2004
Posts: 27
Reply with quote
No, i mean in the actual form there is an email address field for them to put in their email address. I want the replyto address to be relative for that particular email address that they type in, not a permanent email address that I manually put in there. make sense?
Josh
Forum Regular

Joined: 01 Apr 2004
Posts: 1029
Location: Felton, Delaware
Reply with quote
Sorry about that... I got you now... use the ReplyTo property

http://www.bizclasshosting.com/faq/webhostingplans/E-mail/568-aspmail_properties.htm

Code:
<%
Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
Mailer.FromName = ""
Mailer.FromAddress= Address
Mailer.ReplyTo= Address <=======================
Mailer.RemoteHost = ""
Mailer.AddRecipient ""
Mailer.Subject = "New Form Submission"
strMsgHeader = "Form information follows" & vbCrLf
for each qryItem in Request.Form
  strMsgInfo = strMsgInfo & qryItem & " - " & request.Form(qryItem) & vbCrLf
next
strMsgFooter = vbCrLf & "End of form information"
Mailer.BodyText = strMsgHeader & strMsgInfo & strMsgFooter
if Mailer.SendMail then
  Response.Redirect "thankyou.asp"
else
  Response.Write "Mail send failure. Error was " & Mailer.Response
end if
set Mailer = Nothing
%>
Groll


Joined: 23 Dec 2004
Posts: 27
Reply with quote
Thanks for the info. Actually, I found the exact string I needed. For those who had a similar quesion, when putting in an email field in your form and you want to write BACK to that email address, input this:

Mailer.ReplyTo= Request("Email")

As long as the field is names Email this should work.
ASP Mail REPLY TO email address given in Form * Please Help
aerojonny


Joined: 31 Oct 2004
Posts: 5
Location: Santa Barbara, CA
Reply with quote
Any Ideas what I am doing Wrong? In the email generated It says Nams email, not what the form generates....HELP
<%
Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
Mailer.FromName = "Name"
Mailer.ReplyTo= Request("Email")
Mailer.FromAddress= "Email"
Mailer.RemoteHost = "mail.company.com"
Mailer.AddRecipient "Reservation Request", "me@company.com"

Mailer.Subject = "company.com | Rental Inquiry"
strMsgHeader = "Contact Information follows" & vbCrLf
for each qryItem in Request.Form
strMsgInfo = strMsgInfo & qryItem & " - " & request.Form(qryItem) & vbCrLf
next
strMsgFooter = vbCrLf & "End of form information"
Mailer.BodyText = strMsgHeader & strMsgInfo & strMsgFooter
if Mailer.SendMail then
Response.Write "Thank you, your information was submitted...We will contact you soon!"
else
Response.Write "Mail send failure. Error was " & Mailer.Response
end if
set Mailer = Nothing
%>
bobum
Elvis Fanatic
Elvis Fanatic

Joined: 16 Nov 2004
Posts: 746
Location: Montgomery, AL
Reply with quote
Where does it say "Nams email"?

In the Subject?
In the To?
In the ReplyTo?

If I were a betting man I would bet that you were getting the FromName Field displaying "Name" and the FromAddress Field displaying "Email" becuase that's what you are setting them to here :

Code:

Mailer.FromName = "Name"
Mailer.ReplyTo= Request("Email")
Mailer.FromAddress= "Email"


Just a guess (since I'm not familiar with ASPMail) I'd say you might want to do something similar to this

Code:
Mailer.FromName = Request("Name")
Mailer.ReplyTo= Request("Email")
Mailer.FromAddress= Request("Email")
ASPmail
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT  
Page 1 of 1  

  
  
 Reply to topic