Author |
Message |
Teallach
Junior WebHelper
Joined: 25 Apr 2003
Posts: 11
|
Posted:
Mon Apr 28, 2003 5:28 pm (20 years, 11 months ago) |
|
hi
title is self explanatory - i'm adding 'send to a friend' link to an enews i send. i'm using asp to send the email (or a link to a webpage containing the enews) to the friend from the server.
how do i put html links into the asp driven email?
thanks............. |
|
|
|
|
Daniel
Team Member
Joined: 06 Jan 2002
Posts: 2564
|
Posted:
Mon Apr 28, 2003 5:43 pm (20 years, 11 months ago) |
|
Well unless this is an HTML email, you have to just put the plain address in (some email clients will make it into a link anyway). To use links, you'll have to send an HTML email. |
________________________________
|
|
|
|
Teallach
Junior WebHelper
Joined: 25 Apr 2003
Posts: 11
|
Posted:
Mon Apr 28, 2003 5:52 pm (20 years, 11 months ago) |
|
Thanks !
so how do i send this as an html email? script so far is:
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000"><% @ Language="VBscript" %>
<head>
<title>Message Sent</title></head>
<%
Dim name,friendsemail,friendsname,message,NewMailObj
name=request.form("name")
friendsemail=request.form("friendsemail")
friendsname=request.form("friendsname")
message=request.form("message")
Set NewMailObj=Server.CreateObject("CDONTS.NewMail")
NewMailObj.From = name
NewMailObj.To = friendsemail
NewMailObj.Subject = "Friend says....."
NewMailObj.Body = "Hi " & friendsname & _
"<br>Your friend " & name & " wants you to see this email from Company. If you'd also like to receive this mail (every 4-6 weeks), send a blank mail to enews-subscribe@company.co.uk." & _
"<br> Message from your friend : " & message
NewMailObj.BodyFormat = 0
NewMailObj.MailFormat = 0
NewMailObj.Send
Set NewMailObj = nothing
%>
<!--let the user know that the message has been sent-->
<div align="center">
<p> </p>
<p> </p>
<p><font face="Arial, Helvetica, sans-serif" size="3"><b><font color="#990000">Thanks!
Your message was sent!</font></b></font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">To visit our
website, click <a href="http://www.company.co.uk">www.company.co.uk</a></font></p>
</div>
</body>
</html>
PS. i'm a novice, as you can see! |
|
|
|
|
Daniel
Team Member
Joined: 06 Jan 2002
Posts: 2564
|
Posted:
Mon Apr 28, 2003 5:54 pm (20 years, 11 months ago) |
|
Sorry, but I'm actually a novice too with ASP
My advice is don't switch to HTML: many people with old email clients won't be able to read your email or will have problems with it. Stick with no link - most clients will make it into a link automatically anyway. Also sending HTML emails is always much more complicated |
________________________________
|
|
|
|
Teallach
Junior WebHelper
Joined: 25 Apr 2003
Posts: 11
|
Posted:
Mon Apr 28, 2003 6:27 pm (20 years, 11 months ago) |
|
hmmmmm I use MS Outlook & OE6 and they don't make the links live automatically. Good advice though to keep things as simple as poss. I'll heed that.
Thanks.
Teallach. |
|
|
|
|
Daniel
Team Member
Joined: 06 Jan 2002
Posts: 2564
|
Posted:
Mon Apr 28, 2003 6:31 pm (20 years, 11 months ago) |
|
Is the link the email address? In any case make sure it's a valid link (ie: it includes http://). |
________________________________
|
|
|
|
Teallach
Junior WebHelper
Joined: 25 Apr 2003
Posts: 11
|
Posted:
Mon Apr 28, 2003 6:53 pm (20 years, 11 months ago) |
|
yeah, tried eamail address with mailto: & web address with http:// |
|
|
|
|
Daniel
Team Member
Joined: 06 Jan 2002
Posts: 2564
|
Posted:
Mon Apr 28, 2003 7:04 pm (20 years, 11 months ago) |
|
Wait a second, why are there <br> tags in your email? |
________________________________
|
|
|
|
Teallach
Junior WebHelper
Joined: 25 Apr 2003
Posts: 11
|
Posted:
Mon Apr 28, 2003 7:06 pm (20 years, 11 months ago) |
|
well (embarrassed), cos i copied them.... should there not be? |
|
|
|
|
Daniel
Team Member
Joined: 06 Jan 2002
Posts: 2564
|
Posted:
Mon Apr 28, 2003 7:08 pm (20 years, 11 months ago) |
|
Well, in the email which is sent, do you see the <br> tags? If you don't, then this script supports HTML. In that case, use this code for a link:
Code: | <a href="http://www.url.com/">Link Title</a> |
|
________________________________
|
|
|
|
Teallach
Junior WebHelper
Joined: 25 Apr 2003
Posts: 11
|
Posted:
Mon Apr 28, 2003 7:09 pm (20 years, 11 months ago) |
|
|
|
|
adam
Forum Moderator & Developer
Joined: 26 Jul 2002
Posts: 704
Location: UK
|
Posted:
Mon Apr 28, 2003 7:10 pm (20 years, 11 months ago) |
|
well, I don't know about the asp, but the html isn't valid |
________________________________ It's turtles all the way down... |
|
|
|
Daniel
Team Member
Joined: 06 Jan 2002
Posts: 2564
|
Posted:
Mon Apr 28, 2003 7:11 pm (20 years, 11 months ago) |
|
I really think that's the least of Teallach's worries right now But anyway, validating it is a good thing to do |
________________________________
|
|
|
|
Teallach
Junior WebHelper
Joined: 25 Apr 2003
Posts: 11
|
Posted:
Mon Apr 28, 2003 7:19 pm (20 years, 11 months ago) |
|
wayhey! it works! thanks daniel........ |
|
|
|
|
|