...

View Full Version : Auto Email with LINKS



dude9er
07-17-2007, 07:38 PM
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?



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.

nbcrockett
07-17-2007, 08:32 PM
Are you sending the email as text or html?

dude9er
07-17-2007, 08:36 PM
text for now, would html be better?

nbcrockett
07-17-2007, 08:46 PM
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.

dude9er
07-17-2007, 08:51 PM
okay I've changed to html and have been able to create a link



_ & "<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:




_ & "<a href=""mailto:logo@somesite.com?subject=Logo Submit" & L1 & "> click here</a>"



Can you suggest anything that would work?

THANKS!!!!

Daemonspyre
07-17-2007, 08:58 PM
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:


"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


To email us, use this link: mailto:youremail@domain.com

Daemonspyre
07-17-2007, 08:59 PM
_ & "<a href=""mailto:logo@somesite.com?subject=Logo Submit" & L1 & """> click here</a>"


You were missing a couple of double-quotes on the end.

dude9er
07-17-2007, 09:21 PM
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



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


any ideas?

Daemonspyre
07-17-2007, 10:57 PM
Look at my last reply. It shows you why your HREF is failing.

dude9er
07-17-2007, 11:23 PM
Sorry, I missed that post. works great!! thanks for the help!!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum