Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 10 of 10
  1. #1
    New Coder
    Join Date
    Aug 2004
    Posts
    71
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Auto Email with LINKS

    Alright, I have been looking and have not been able to find how to do this. I'm sure it's easy.

    I have a form that is submitted and a auto response text email is sent to the visitor's email. I'm trying to add an "href" link to the body of the text email, so not to have to type out the entire link in the email. Here is a sample of the code, but how to I get this simple link in there?

    Code:
    Const strHeader = "Your Order."
    Const strFooter = "www.somesite.com"
    Dim strSubject, strCC, strBcc, strBody, strFrom, objCDO
    
    
    strBody = strHeader & ( vbCrLf & vbCrLf ) & "Thank you for ordering your. We are currently processing your order. Please allow 1-2 weeks for your order to be printed and shipped." 
    & ( vbCrLf & vbCrLf ) & 
    "You order ID is " & Request.Form("L1")  & " ." & ( vbCrLf & vbCrLf ) & "Be sure to include your order ID when sending your logo. <a href="http://yahoo.com">Click here</a> for logo size requirements." 
    
    strBody = strBody & ( vbCrLf & strFooter )
    Also, since we're on the topic how can I incorporate a mailto with subject link in the body eg. <a href="mailto:someone@yoursite.com?subject=Mail from Our Site">Email Us</a>

    Thanks in advance.

  • #2
    New Coder
    Join Date
    Jul 2007
    Location
    North Carolina, US
    Posts
    32
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Are you sending the email as text or html?

  • #3
    New Coder
    Join Date
    Aug 2004
    Posts
    71
    Thanks
    0
    Thanked 0 Times in 0 Posts
    text for now, would html be better?

  • #4
    New Coder
    Join Date
    Jul 2007
    Location
    North Carolina, US
    Posts
    32
    Thanks
    1
    Thanked 0 Times in 0 Posts
    The email has to be sent as html or the link tag won't work. It'll just show up as text. Post your email code.

  • #5
    New Coder
    Join Date
    Aug 2004
    Posts
    71
    Thanks
    0
    Thanked 0 Times in 0 Posts
    okay I've changed to html and have been able to create a link

    Code:
     
    _ & "<a href=""http://www.somesite.com/"">Click here</a>!"

    Now i'd like a mailto with subject and a value from my form. This is not working:

    Code:
    _ & "<a href=""mailto:logo@somesite.com?subject=Logo Submit" & L1 & "> click here</a>"
    Can you suggest anything that would work?

    THANKS!!!!

  • #6
    Regular Coder
    Join Date
    Mar 2007
    Posts
    505
    Thanks
    1
    Thanked 19 Times in 19 Posts
    nbCrockett, you are not totally correct.

    Most plain text systems will recognize links in emails.

    However, you cannot include the HTML <a href=""></a> tags in the plain text email.

    If you want to use your code, just do:

    Code:
    "Your order ID is " & Request.Form("L1")  & " ." & ( vbCrLf & vbCrLf ) & "Be sure to include your order ID when sending your logo. To see logo size requirements, go to http://www.yahoo.com
    FYI - You have a couple of grammatical mistakes in your resultant code. I know that may sound mean or obtuse, but if you are going to send this out, you need to fix these so that your customers are not put off by incorrect grammar. Also remember that a lot of phishing and spamming sites use incorrect grammar/spelling to catch people offguard. You do not want to be added to blacklists because of this.

    To include a mailto: link in your email, for HTML mail you have the correct code. For plain text mail, just use

    Code:
    To email us, use this link:  mailto:youremail@domain.com
    To say my fate is not tied to your fate is like saying, 'Your end of the boat is sinking.' -- Hugh Downs
    Please, if you found my post helpful, pay it forward. Go and help someone else today.

  • #7
    Regular Coder
    Join Date
    Mar 2007
    Posts
    505
    Thanks
    1
    Thanked 19 Times in 19 Posts
    Code:
    _ & "<a href=""mailto:logo@somesite.com?subject=Logo Submit" & L1 & """> click here</a>"
    You were missing a couple of double-quotes on the end.
    To say my fate is not tied to your fate is like saying, 'Your end of the boat is sinking.' -- Hugh Downs
    Please, if you found my post helpful, pay it forward. Go and help someone else today.

  • #8
    New Coder
    Join Date
    Aug 2004
    Posts
    71
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thanks daemonspyre for you help so far and the heads up on my grammer. I guess I need to proof read a little better.

    I've got the mailto: link to work, however I am trying to incorporate a form value into the subject and it's busting out the href

    Code:
    Click <a href=""mailto:logo@gun-safe-magnets.com?subject=Logo Submit" & Request.Form("L1")  & ">here</a>
    any ideas?

  • #9
    Regular Coder
    Join Date
    Mar 2007
    Posts
    505
    Thanks
    1
    Thanked 19 Times in 19 Posts
    Look at my last reply. It shows you why your HREF is failing.
    To say my fate is not tied to your fate is like saying, 'Your end of the boat is sinking.' -- Hugh Downs
    Please, if you found my post helpful, pay it forward. Go and help someone else today.

  • #10
    New Coder
    Join Date
    Aug 2004
    Posts
    71
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Sorry, I missed that post. works great!! thanks for the help!!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •