The "Email a Page" form calls the URL from the previous page using:
<input type="hidden" name="URL" value="<%= Request.ServerVariables("HTTP_REFERER")%>">
The action page uses CDOsys to send the email: My abridged code:
Expand|Select|Wrap|Line Numbers
- <%@LANGUAGE="VBSCRIPT"%>
- <%
- strFrom = Request.Form("FromEmail")
- strFromName = Request.Form("FromName")
- Set cdoMail = Server.CreateObject("CDO.Message")
- Set cdoCON = Server.CreateObject ("CDO.Configuration")
- Set cdoMail.Configuration = cdoCON
- cdoMail.From = strFrom
- cdoMail.Subject = "Article Feedback"
- cdoMail.HTMLBody = vbCRLF & "<strong>Feedback has been submitted on the article below:</strong>" & "<br />"_
- & Trim(Request.Form("URL"))
- With cdoMail
- Set cdoMail.Configuration = cdoCON
- .From = Request.Form("FromEmail")
- . Sender = "ArticleFeedback@myWebsite.com"
- .To = "myEmail@myWebsite.com"
- .Subject ="Article Feedback"
- '.HTMLBody = Body
- 'CDONTSMail.BodyFormat=0
- 'CDONTSMail.MailFormat=0
- .Send
- End With
- Set cdoMail = Nothing
- Set cdoCON = Nothing
- %>
Thank you.