Home > ASP Programming > Link to e-mail an HTML document

Link to e-mail an HTML document



I need to know how to write a link that will e-mail html code. If it's possible, I want to have the user click on a link and have Outlook open up with a title (this part already works) and the body filled with html code that I push in. Here is my current code:



response.redirect "mailto:?subject=" & session("screenname") & "Report&Body=" & session("msgblock")



The session values are from a previous asp page that links to this page when you click an the e-mail link.



The session values both show up when I put in a response.write and the title (which is not html, just text) works in the response.redirect -- Outlook opens just fine. The problem is with the msgblock which is in html. Do I need to write a script so that Outlook knows to format for html? Any ideas?



Thanks!

Becca

    
Guest


If you are really going to try to put the entire message body in a querystring, you should encode it to be safe as part of a url



server.urlencode(session("msgblock")) for example.



However I'd suggest a re-design where either you create server code to send the email, or you put the msgbody in the page html and not in the url of the browser page.

Was this answer helpful ? Yes No   
Guest


Thanks for the suggestion, but I'm not trying to put the html code in the url. I'm trying to redirect to an e-mail where the html code would appear in the body of the e-mail. Any suggestions?

Was this answer helpful ? Yes No   
Guest


Quote:
Originally Posted by RHSQL
Thanks for the suggestion, but I'm not trying to put the html code in the url. I'm trying to redirect to an e-mail where the html code would appear in the body of the e-mail. Any suggestions?


Rather than opening up the user's email client, you could probably just put a little form on your page and send the email server-side.

Was this answer helpful ? Yes No   
Guest


Thanks for your help. I was going to do it that way originally, but the person who will use this software wanted Outlook to open so that they could use lists of e-mail recipients from Outlook instead of having to type in the e-mail addresses into a form. But it seems like that may be the only way to accomplish this...unless anyone has an idea......

Was this answer helpful ? Yes No   
Guest
 
 
Home - About Infoqu - Contact - Privacy Statement - Link to Infoqu - Bookmark Infoqu

Copyright 2007-2010 by Infoqu. All rights reserved