Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamically change email subject through ASP

Status
Not open for further replies.

jfrost10

Programmer
Jun 3, 2001
2,004
CA
Hi guys,

I want to be able to allow the user to click on an email link and be prompted with a blank email (using their own client...outlook, eudora, whatever) and have the subject be changed to a Session Variable relating to a report they've just requested. How would I go about doing that? I have some code, but it will only allow static changes to the subject, not dynamic.

thanks,

Jack
 
This should work for you:

<a HREF=&quot;mailto:address@isp.com?subject=<%=Session(&quot;email_subject&quot;)%>&quot;>address@isp.com</A>
 
I thought that would work too, but when I tried it for some reason the tag doesn't recognize the <% %>. I did save it as an ASP file. Maybe the tags just don't allow ASP to print in them?

J
 
Hello, jfrost10 and Swany,
The problem is with quoutes - the string actuly was from &quot;mailto till (&quot;
I would suggest a workaround like using pair of single quotes and double quotes.
<A HREF='mailto:address@isp.com?subject=<%=Session(&quot;email_subject&quot;)%>'>address@isp.com</A>
Hope this helps.
D.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top