Help with "From" address in ASP version of Universal E-mail
Hi. We have Universal E-mail configured on an old ASP website, supporting a standard contact form.
When the e-mail arrives with the client, they can't click "Reply" in their e-mail software because we were forced, by our host, to have a recognised POP3 address from the domain listed as the From address, otherwise it wouldn't authorise and wouldn't send.
The PHP version of this script is the same, however we can set a Reply To address in the background, because we can still edit this script due to it being PHP.
We can no longer edit the script in ASP so I wanted to ask if you could help us with a manual change to the script so that when our client clicks reply, it replies to the e-mail address that's submitted by the user in the form. The e-mail address comes from a form field called... Request.Form("swpcEMAIL")
This is the ASP Universal E-mail script....
<%
function WA_Universal_Email_1_SendMail(RecipientEmail)
dim MailObject, MailAttachments, MailBCC, MailCC, MailTo, MailBodyFormat, MailBody, MailImportance, MailFrom, MailSubject
MailAttachments = ""
MailBCC = ""
MailCC = ""
MailTo = ""
MailBodyFormat = ""
MailBody = ""
MailImportance = ""
MailFrom = "form@southwestpropertycentre.co.uk"
MailSubject = "SWPC Website Enquiry"
'Global Variables
gBodyFormat = ""
set WA_MailObject = WAUE_Definition("websmtp.livemail.co.uk","","")
if (RecipientEmail <> "") then
set WA_MailObject = WAUE_AddRecipient(WA_MailObject,RecipientEmail)
else
'To Entries
end if
'Attachment Entries
'BCC Entries
'CC Entries
'Character Set
'Body Format
set WA_MailObject = WAUE_BodyFormat(WA_MailObject,0)
MailBodyFormat = gBodyFormat
'Set Importance
set WA_MailObject = WAUE_SetImportance(WA_MailObject,"3")
'Start Mail Body
MailBody = MailBody & "<html><head><style type=" & Chr(34) & "text/css" & Chr(34) & " media=" & Chr(34) & "all" & Chr(34) & ">body {font-family: Arial, Verdana, Helvetica, sans-serif;font-size: 14px;font-weight: normal;color: #000000;background-color: #FFFFFF;} .newstitle {font-size: 18px;color: #000000;line-height: 22px;font-weight: normal;font-family: Arial, sans-serif;margin: 10px 0 10px 0;}</style></head><body>" & vbCrlf & ""
MailBody = MailBody & "<p><img src=" & Chr(34) & "http://www.southwestpropertycentre.co.uk/estate-agents-scotland/logo-swpcheader.gif" & Chr(34) & " alt=" & Chr(34) & "South West Property Centre Logo" & Chr(34) & " title=" & Chr(34) & "South West Property Centre Logo" & Chr(34) & " width=" & Chr(34) & "230" & Chr(34) & " height=" & Chr(34) & "112" & Chr(34) & " style=" & Chr(34) & "margin:15px 0 5px 0;" & Chr(34) & " /></p>" & vbCrlf & ""
MailBody = MailBody & "<p>You have received the following enquiry via the contact form on the SWPC website: </p>" & vbCrlf & ""
MailBody = MailBody & "<p>Name:<br />" & vbCrlf & ""
MailBody = MailBody & " <strong>"
MailBody = MailBody & cStr(Request.Form("swpcNAME"))
MailBody = MailBody & "</strong></p>" & vbCrlf & ""
MailBody = MailBody & "<p>Telephone:<br />" & vbCrlf & ""
MailBody = MailBody & " <strong>"
MailBody = MailBody & cStr(Request.Form("swpcTEL"))
MailBody = MailBody & "</strong></p>" & vbCrlf & ""
MailBody = MailBody & "<p>E-mail:<br />" & vbCrlf & ""
MailBody = MailBody & " <a href=" & Chr(34) & "mailto:"
MailBody = MailBody & cStr(Request.Form("swpcEMAIL"))
MailBody = MailBody & "" & Chr(34) & ">"
MailBody = MailBody & cStr(Request.Form("swpcEMAIL"))
MailBody = MailBody & "</a></p>" & vbCrlf & ""
MailBody = MailBody & "<p>Property / Enquiry:<br /> " & vbCrlf & ""
MailBody = MailBody & " <strong>"
MailBody = MailBody & cStr(Request.Form("swpcPROP"))
MailBody = MailBody & "</strong></p>" & vbCrlf & ""
MailBody = MailBody & "<p>Enquiry Details:<br /> " & vbCrlf & ""
MailBody = MailBody & " <strong>"
MailBody = MailBody & cStr(Request.Form("swpcENQ"))
MailBody = MailBody & "</strong></p>" & vbCrlf & ""
MailBody = MailBody & "<p> </p>" & vbCrlf & ""
MailBody = MailBody & "<p><span class=" & Chr(34) & "newstitle" & Chr(34) & ">Registered Office:</span><br />" & vbCrlf & ""
MailBody = MailBody & "South West Property Centre <br />" & vbCrlf & ""
MailBody = MailBody & "Charlotte Street <br />" & vbCrlf & ""
MailBody = MailBody & "Stranraer<br />" & vbCrlf & ""
MailBody = MailBody & "Wigtownshire<br />" & vbCrlf & ""
MailBody = MailBody & "Scotland<br />" & vbCrlf & ""
MailBody = MailBody & "DG9 7ED</p>" & vbCrlf & ""
MailBody = MailBody & "<p>Telephone: 01776 706147<br />" & vbCrlf & ""
MailBody = MailBody & " Fax: 01776 706890<br />" & vbCrlf & ""
MailBody = MailBody & " E-mail: <a href=" & Chr(34) & "mailto:property@swpc.co.uk" & Chr(34) & ">mailto:property@swpc.co.uk</a></p></body></html>"
'End Mail Body
set WA_MailObject = WAUE_SendMail(WA_MailObject,MailAttachments,MailBCC,MailCC,MailTo,MailImportance,MailFrom,MailSubject,MailBody)
set WA_MailObject = nothing
end function
%>
<%
if (("" = "")) then
'WA Universal Email object="JMail"
'Send Loop Once Per Entry
WA_Universal_Email_1_SendMail("euan@southwestpropertycentre.co.uk")
WA_Universal_Email_1_SendMail("ross@southwestpropertycentre.co.uk")
'Send Mail All Entries
if (""<>"") then
Response.Redirect("")
end if
end if
%>
Thank you.
NJ