Placing pre-formatted body text into Outlook email?
am 28.01.2008 14:02:25 von JohnKotuby
Hi all,
My ASP.NET 2.0 VB website has "Request More Info" link that opens a web
form and then sends that form via web mail. My customers have asked "Can you
get your site to place that form (along with the SendTo and Subject) into my
Outlook email client so that I have a record of my request?"
I am stuck at a certain point.
I can get the SendTo, and Subject into the email because it doesn't require
any Line Breaks or formatting whatsoever.
Here is a bit of my JavaScript that I am using.
-------------------------------------
function ShowEmail()
{
var eAddr = document.links("contEmail").href
var theLists = document.getElementById("hidListTexts").value;
var arrayLists = theLists.split("~~")
var theBody = ''
if (arrayLists.length > 0)
{
for (var i = 0; i < arrayLists.length; i++)
{
theBody += arrayLists[i]+'\n\r'
}
}
eAddr += '?subject=Please%20Provide%20Information%20About%20These%20L ists'
eAddr += '&body=' + theBody
window.navigate(eAddr)
}
-------------------------------------
I pull the current MailTo HREF from a link on the page (that Address changes
depending on the products the user selects).
Where I get stuck is trying to place a simple list of the user-selected
products separated by line-breaks in the email.
I read an article that recommended placing "\n\r" into a text string created
with Javascript to put a newline/carriage-return into the text.
Outlook seems to be ignoring this approach.
Can anyone help me with a suggestion or a link to information that might
explain how to accomplish what I need?
It doesn't need to be Javascript. Anything that would accomplish the task at
hand would be appreciated.
Thanks for any help in this matter...
Re: Placing pre-formatted body text into Outlook email?
am 28.01.2008 17:53:37 von shahkalpesh
John,
For carriage return, try %0D
mailto:me@groups.google.com?subject=hello&body=hello%0Dworld
Does that work?
Kalpesh
On Jan 28, 6:02 pm, "John Kotuby"
wrote:
> Hi all,
> My ASP.NET 2.0 VB website has "Request More Info" link that opens a web
> form and then sends that form via web mail. My customers have asked "Can you
> get your site to place that form (along with the SendTo and Subject) into my
> Outlook email client so that I have a record of my request?"
>
> I am stuck at a certain point.
>
> I can get the SendTo, and Subject into the email because it doesn't require
> any Line Breaks or formatting whatsoever.
>
> Here is a bit of my JavaScript that I am using.
> -------------------------------------
> function ShowEmail()
> {
> var eAddr = document.links("contEmail").href
> var theLists = document.getElementById("hidListTexts").value;
> var arrayLists = theLists.split("~~")
> var theBody = ''
> if (arrayLists.length > 0)
> {
> for (var i = 0; i < arrayLists.length; i++)
> {
> theBody += arrayLists[i]+'\n\r'}
> }
>
> eAddr += '?subject=Please%20Provide%20Information%20About%20These%20L ists'
> eAddr += '&body=' + theBody
> window.navigate(eAddr)}
>
> -------------------------------------
>
> I pull the current MailTo HREF from a link on the page (that Address changes
> depending on the products the user selects).
>
> Where I get stuck is trying to place a simple list of the user-selected
> products separated by line-breaks in the email.
> I read an article that recommended placing "\n\r" into a text string created
> with Javascript to put a newline/carriage-return into the text.
>
> Outlook seems to be ignoring this approach.
>
> Can anyone help me with a suggestion or a link to information that might
> explain how to accomplish what I need?
> It doesn't need to be Javascript. Anything that would accomplish the task at
> hand would be appreciated.
>
> Thanks for any help in this matter...
Re: Placing pre-formatted body text into Outlook email?
am 28.01.2008 19:07:45 von JohnKotuby
Thanks Kalpesh,
Works like a charm. I would have never thought of using the hexadecimal
equivalent of CHR(13) in combination with %0 as in %0D.
Thank you so much.
BTW...It didn't work at first because I was concatenating my string in
javascript using + '%0D' instead of "%0D".
Using double quotes seemed to make a difference for me.
Thanks again...
"Kalpesh" wrote in message
news:87190152-3cdd-425a-a8b1-fcd83cf03414@i29g2000prf.google groups.com...
> John,
>
> For carriage return, try %0D
> mailto:me@groups.google.com?subject=hello&body=hello%0Dworld
>
> Does that work?
>
> Kalpesh
>
> On Jan 28, 6:02 pm, "John Kotuby"
> wrote:
>> Hi all,
>> My ASP.NET 2.0 VB website has "Request More Info" link that opens a web
>> form and then sends that form via web mail. My customers have asked "Can
>> you
>> get your site to place that form (along with the SendTo and Subject) into
>> my
>> Outlook email client so that I have a record of my request?"
>>
>> I am stuck at a certain point.
>>
>> I can get the SendTo, and Subject into the email because it doesn't
>> require
>> any Line Breaks or formatting whatsoever.
>>
>> Here is a bit of my JavaScript that I am using.
>> -------------------------------------
>> function ShowEmail()
>> {
>> var eAddr = document.links("contEmail").href
>> var theLists = document.getElementById("hidListTexts").value;
>> var arrayLists = theLists.split("~~")
>> var theBody = ''
>> if (arrayLists.length > 0)
>> {
>> for (var i = 0; i < arrayLists.length; i++)
>> {
>> theBody += arrayLists[i]+'\n\r'}
>> }
>>
>> eAddr +=
>> '?subject=Please%20Provide%20Information%20About%20These%20L ists'
>> eAddr += '&body=' + theBody
>> window.navigate(eAddr)}
>>
>> -------------------------------------
>>
>> I pull the current MailTo HREF from a link on the page (that Address
>> changes
>> depending on the products the user selects).
>>
>> Where I get stuck is trying to place a simple list of the user-selected
>> products separated by line-breaks in the email.
>> I read an article that recommended placing "\n\r" into a text string
>> created
>> with Javascript to put a newline/carriage-return into the text.
>>
>> Outlook seems to be ignoring this approach.
>>
>> Can anyone help me with a suggestion or a link to information that might
>> explain how to accomplish what I need?
>> It doesn't need to be Javascript. Anything that would accomplish the task
>> at
>> hand would be appreciated.
>>
>> Thanks for any help in this matter...
>