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

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MrCorbeaux
    New Member
    • Nov 2008
    • 2

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

    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.ServerV ariables("HTTP_ REFERER")%>">

    The action page uses CDOsys to send the email: My abridged code:
    Code:
    <%@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 
    %>
    What am I missing from my cdoMail.HTMLBod y?

    Thank you.
    Last edited by DrBunchman; Nov 21 '08, 08:03 AM. Reason: Added [Code] Tags - Please use the '#' button
  • jhardman
    Recognized Expert Specialist
    • Jan 2007
    • 3405

    #2
    You are missing the code for the hyperlink.
    Code:
    dim q
    q = chr(34)
    cdoMail.HTMLBody = vbCRLF & "<strong>Feedback has been submitted on the article below:</strong>" & "<br />"_ 
      & "<a href=" & q & Trim(Request.Form("URL")) & q & ">" & Trim(Request.Form("URL")) & "</a>
    Let me know if this helps.

    Jared

    Comment

    • DrBunchman
      Recognized Expert Contributor
      • Jan 2008
      • 979

      #3
      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

      Comment

      • MrCorbeaux
        New Member
        • Nov 2008
        • 2

        #4
        jhardman,
        I worked with the code you provided and it works great. Thanks much.

        Comment

        Working...