Forums

This topic is locked

CDO mail send an actual email link, not just text

Posted 16 Jul 2002 23:48:19
1
has voted
16 Jul 2002 23:48:19 Mitchel Tendler posted:
Hi!

I have the following code and it works fine, except the email address it send is just text and not a link:


mailbody=mailbody & "E-mail Address: " & "  " & Request("email" & "<br>"


I think it's obvious that the reason is the absence of the &lt;a href="mailto<img src=../images/dmxzone/forum/icon_smile_kisses.gif border=0 align=middle> "&gt;whatever&lt;/a&gt; code.

It's just that for the life of me I can't figure out how to put the a=href="mailto code into the CDO code.

Help

Mitch

Replies

Replied 17 Jul 2002 07:51:03
17 Jul 2002 07:51:03 aegis kleais replied:
Well, first, I can't make out whether you're parsing the email address out of the URL or if you're just gonna get it from a recordset, but I'll try to provide both:

From URL, email=[value]

mailbody = mailbody & "Email Address: &lt;a href='mailto:'" & Request.QueryString("email" & "'&gt;" & Request.QueryString("email" & "&lt;/a&gt;"

This should make it say:

Email Address: (with my email address being a link)

----------------------------------------

From Database Value, ie fldEmail in recordset rsUsers

mailbody = mailbody & "Email Address: &lt;a href='mailto:'" & rsUsers.Fields.Item("fldEmail".Value & "'&gt;" & rsUsers.Fields.Item("fldEmail".Value & "&lt;/a&gt;"

Aegis Kleais
New Media Web Developer
(DWMX : IIS5.1 : SQL2K : WXP : ASP[VB/JS])
Replied 17 Jul 2002 16:33:22
17 Jul 2002 16:33:22 Mitchel Tendler replied:
Thanks aegiskleais!

You pinted me in the right direction, I was finally able to get it to work using this code:


mailbody=mailbody & "E-mail Address:&lt;a href='mailto:" & Request("email" & "'&gt;" & Request("email" & "&lt;br&gt;"


It's people like you that are willing to help, that makes this board awesome!

Thanks!

Mitch
Replied 17 Jul 2002 18:16:48
17 Jul 2002 18:16:48 aegis kleais replied:
Glad it worked for ya.

Aegis Kleais
New Media Web Developer
(DWMX : IIS5.1 : SQL2K : WXP : ASP[VB/JS])

Reply to this topic