By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,246 Members | 1,553 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,246 IT Pros & Developers. It's quick & easy.

URL from an "Email a Page" is an inactive hyperlink

P: 2
My "Email a Webpage" form works find except when the end user receives the email, the URL is text only and not a hyperlink.

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
  1. <%@LANGUAGE="VBSCRIPT"%>
  2. <% 
  3. strFrom = Request.Form("FromEmail")
  4. strFromName = Request.Form("FromName")
  5.  
  6. Set cdoMail = Server.CreateObject("CDO.Message") 
  7. Set cdoCON = Server.CreateObject ("CDO.Configuration") 
  8. Set cdoMail.Configuration = cdoCON 
  9.  
  10. cdoMail.From = strFrom
  11. cdoMail.Subject = "Article Feedback"
  12. cdoMail.HTMLBody = vbCRLF & "<strong>Feedback has been submitted on the article below:</strong>" & "<br />"_ 
  13.   & Trim(Request.Form("URL"))
  14.  
  15.   With cdoMail 
  16.          Set cdoMail.Configuration = cdoCON 
  17.         .From = Request.Form("FromEmail")
  18.         . Sender = "ArticleFeedback@myWebsite.com"
  19.         .To = "myEmail@myWebsite.com"
  20.         .Subject ="Article Feedback"
  21.         '.HTMLBody = Body
  22.         'CDONTSMail.BodyFormat=0
  23.         'CDONTSMail.MailFormat=0
  24.         .Send 
  25.     End With 
  26.  
  27. Set cdoMail = Nothing 
  28. Set cdoCON = Nothing 
  29. %>  
What am I missing from my cdoMail.HTMLBody?

Thank you.
Nov 18 '08 #1
Share this Question
Share on Google+
3 Replies


jhardman
Expert 2.5K+
P: 3,405
You are missing the code for the hyperlink.
Expand|Select|Wrap|Line Numbers
  1. dim q
  2. q = chr(34)
  3. cdoMail.HTMLBody = vbCRLF & "<strong>Feedback has been submitted on the article below:</strong>" & "<br />"_ 
  4.   & "<a href=" & q & Trim(Request.Form("URL")) & q & ">" & Trim(Request.Form("URL")) & "</a>
Let me know if this helps.

Jared
Nov 20 '08 #2

DrBunchman
Expert 100+
P: 979
Hi MrCorbeaux,

Further to Jared's answer to your question I just wanted to say welcome to Bytes! Please take the time to read the Posting Guidelines if you have not done so already.

Please don't forget to wrap your code in CODE tags - it makes your posts much easier to read.

Thanks,

Dr B
Nov 21 '08 #3

P: 2
jhardman,
I worked with the code you provided and it works great. Thanks much.
Nov 25 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.