4WebHelp
 FAQ  •  Search  •  User Groups  •  Forum Admins  •  Smilies List  •  Statistics  •  Rules   •  Login   •  Register
Toggle Navigation Menu

 adding html to asp script
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic
Author Message
Teallach
Junior WebHelper
Junior WebHelper


Joined: 25 Apr 2003
Posts: 11

PostPosted: Mon Apr 28, 2003 5:28 pm (20 years, 11 months ago) Reply with QuoteBack to Top

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.............
OfflineView User's ProfileFind all posts by TeallachSend Personal MessageYahoo Messenger
Daniel
Team Member



Joined: 06 Jan 2002
Posts: 2564

PostPosted: Mon Apr 28, 2003 5:43 pm (20 years, 11 months ago) Reply with QuoteBack to Top

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.

________________________________
Image
OfflineView User's ProfileFind all posts by DanielSend Personal Message
Teallach
Junior WebHelper
Junior WebHelper


Joined: 25 Apr 2003
Posts: 11

PostPosted: Mon Apr 28, 2003 5:52 pm (20 years, 11 months ago) Reply with QuoteBack to Top

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>&nbsp;</p>
<p>&nbsp;</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! Rolling Eyes
OfflineView User's ProfileFind all posts by TeallachSend Personal MessageYahoo Messenger
Daniel
Team Member



Joined: 06 Jan 2002
Posts: 2564

PostPosted: Mon Apr 28, 2003 5:54 pm (20 years, 11 months ago) Reply with QuoteBack to Top

Sorry, but I'm actually a novice too with ASP Smile

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 Very Happy

________________________________
Image
OfflineView User's ProfileFind all posts by DanielSend Personal Message
Teallach
Junior WebHelper
Junior WebHelper


Joined: 25 Apr 2003
Posts: 11

PostPosted: Mon Apr 28, 2003 6:27 pm (20 years, 11 months ago) Reply with QuoteBack to Top

hmmmmm Confused 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.
OfflineView User's ProfileFind all posts by TeallachSend Personal MessageYahoo Messenger
Daniel
Team Member



Joined: 06 Jan 2002
Posts: 2564

PostPosted: Mon Apr 28, 2003 6:31 pm (20 years, 11 months ago) Reply with QuoteBack to Top

Is the link the email address? In any case make sure it's a valid link (ie: it includes http://).

________________________________
Image
OfflineView User's ProfileFind all posts by DanielSend Personal Message
Teallach
Junior WebHelper
Junior WebHelper


Joined: 25 Apr 2003
Posts: 11

PostPosted: Mon Apr 28, 2003 6:53 pm (20 years, 11 months ago) Reply with QuoteBack to Top

yeah, tried eamail address with mailto: & web address with http:// Sad Sad
OfflineView User's ProfileFind all posts by TeallachSend Personal MessageYahoo Messenger
Daniel
Team Member



Joined: 06 Jan 2002
Posts: 2564

PostPosted: Mon Apr 28, 2003 7:04 pm (20 years, 11 months ago) Reply with QuoteBack to Top

Wait a second, why are there <br> tags in your email?

________________________________
Image
OfflineView User's ProfileFind all posts by DanielSend Personal Message
Teallach
Junior WebHelper
Junior WebHelper


Joined: 25 Apr 2003
Posts: 11

PostPosted: Mon Apr 28, 2003 7:06 pm (20 years, 11 months ago) Reply with QuoteBack to Top

well (embarrassed), cos i copied them.... should there not be?
OfflineView User's ProfileFind all posts by TeallachSend Personal MessageYahoo Messenger
Daniel
Team Member



Joined: 06 Jan 2002
Posts: 2564

PostPosted: Mon Apr 28, 2003 7:08 pm (20 years, 11 months ago) Reply with QuoteBack to Top

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>

________________________________
Image
OfflineView User's ProfileFind all posts by DanielSend Personal Message
Teallach
Junior WebHelper
Junior WebHelper


Joined: 25 Apr 2003
Posts: 11

PostPosted: Mon Apr 28, 2003 7:09 pm (20 years, 11 months ago) Reply with QuoteBack to Top

will try
OfflineView User's ProfileFind all posts by TeallachSend Personal MessageYahoo Messenger
adam
Forum Moderator & Developer



Joined: 26 Jul 2002
Posts: 704
Location: UK

PostPosted: Mon Apr 28, 2003 7:10 pm (20 years, 11 months ago) Reply with QuoteBack to Top

well, I don't know about the asp, but the html isn't valid Wink

________________________________
It's turtles all the way down...
OfflineView User's ProfileFind all posts by adamSend Personal MessageVisit Poster's Website
Daniel
Team Member



Joined: 06 Jan 2002
Posts: 2564

PostPosted: Mon Apr 28, 2003 7:11 pm (20 years, 11 months ago) Reply with QuoteBack to Top

I really think that's the least of Teallach's worries right now Wink But anyway, validating it is a good thing to do Smile

________________________________
Image
OfflineView User's ProfileFind all posts by DanielSend Personal Message
Teallach
Junior WebHelper
Junior WebHelper


Joined: 25 Apr 2003
Posts: 11

PostPosted: Mon Apr 28, 2003 7:19 pm (20 years, 11 months ago) Reply with QuoteBack to Top

wayhey! it works! thanks daniel........ Very Happy Very Happy Very Happy
OfflineView User's ProfileFind all posts by TeallachSend Personal MessageYahoo Messenger
Display posts from previous:      
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic


 Jump to:   




You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot edit your posts in this forum.
You cannot delete your posts in this forum.
You cannot vote in polls in this forum.


Page generation time: 0.386478 seconds :: 17 queries executed :: All Times are GMT
Powered by phpBB 2.0 © 2001, 2002 phpBB Group :: Based on an FI Theme