advanced mailto: question

liunx

Guest
Hi all,<br />
<br />
I am working on an Intranet system with email templates that open in an email client like Outlook Express.<br />
<br />
The idea is to use mailto. For example:<br />
<br />
<br />
<a href=http://www.htmlforums.com/archive/index.php/"mailto:[email protected]?subject=subject template1&body=bla bla">template 1</a><br />
<br />
<br />
The problem I have is the body part of the message which can be a substantial amount of text. I can't figure out how to include line breaks. <br> is printed in the page, \n is completely ignored.<br />
<br />
Any ideas?<br />
<br />
Thanks,<br />
Raoul<!--content-->found the answer: %0D%0A or %0D%0A%0A<br />
<br />
Still one question remaining. The message opens in plain text format. Is there a way to open it in html format?<br />
<br />
Thanks,<br />
Raoul<!--content-->Try declaring the enctype as text/html<br />
as opposed to text/plain<br />
<br />
eg:<br />
<FORM METHOD="POST" ENCTYPE="text/html"><br />
<br />
....Willy<!--content-->well where would they have the "form" tag to do that?<!--content-->Originally posted by safra <br />
found the answer: %0D%0A or %0D%0A%0A<br />
<br />
Still one question remaining. The message opens in plain text format. Is there a way to open it in html format?<br />
<br />
Thanks,<br />
Raoul <br />
you are very limited in doing what you want with the mailto: tag.<!--content-->Thanks,<br />
<br />
Yes, it seems I am a bit limited with the mailto tag. But does anyone have a better solution? I would like to have the message first appear in Outlook Express so it can be modified if necessary.<br />
<br />
Using a form will instantly send the message which means I should make the body editable in the browser window and also using ENCTYPE='text/html' doesn't seem to work, body is empty.<br />
<br />
Any suggestions?<br />
<br />
Raoul<!--content-->Originally posted by safra <br />
Hi all,<br />
<br />
I am working on an Intranet system with email templates that open in an email client like Outlook Express.<br />
<br />
The idea is to use mailto. For example:<br />
<br />
<br />
<a href=http://www.htmlforums.com/archive/index.php/"mailto:[email protected]?subject=subject template1&body=bla bla">template 1</a><br />
<br />
<br />
The problem I have is the body part of the message which can be a substantial amount of text. I can't figure out how to include line breaks. <br> is printed in the page, \n is completely ignored.<br />
<br />
Any ideas?<br />
<br />
Thanks,<br />
Raoul <br />
<br />
Another problem you will have is that what you are doing is by no means some type of a standard. It might work fine and dandy with Outlook Express but may not work at all with other email applications.<!--content-->Originally posted by kevin <br />
Another problem you will have is that what you are doing is by no means some type of a standard. It might work fine and dandy with Outlook Express but may not work at all with other email applications.<br />
it is for Intranet so I don't think it matters.<br />
<br />
Originally posted by safra <br />
Thanks,<br />
<br />
Yes, it seems I am a bit limited with the mailto tag. But does anyone have a better solution? I would like to have the message first appear in Outlook Express so it can be modified if necessary.<br />
<br />
Using a form will instantly send the message which means I should make the body editable in the browser window and also using ENCTYPE='text/html' doesn't seem to work, body is empty.<br />
<br />
Any suggestions?<br />
<br />
Raoul <br />
you will need to use some serverside language to do what you want. either php or cgi or asp. other than that you will not get what you want with just the emailto tag.<!--content-->Originally posted by scoutt <br />
it is for Intranet so I don't think it matters.<br />
<br />
<br />
oops, I missed that little detail :P<!--content-->Originally posted by pyrexyn <br />
well where would they have the "form" tag to do that? <br />
<br />
By simply using a form submit rather than an anchor.<!--content-->Yes, it is for internal use only.<br />
<br />
Originally posted by scoutt <br />
you will need to use some serverside language to do what you want. either php or cgi or asp. other than that you will not get what you want with just the emailto tag.<br />
<br />
the intranet is coded in php. But I can't see how a serverside language can force an outlook message window to pop up? Or do you mean using for example the mail() function in php. That is how it works now but we prefer to operate as much as possible though the email client so we can use it as a reference.<br />
<br />
With what we got so far the emailto tag is serving just fine. The body is dynamically generated through php/MySQL and everything opens up correctly in the email client. The only thing at this point is that it is opened in text format. But I guess this is something we will have to accept, it is not that important.<br />
<br />
Raoul<!--content-->welll that is all you get. the mail function will work a lot better. they will still recieve it in outlook still. but if you keep a reference to who you send it to then yeah the mailto will be the best. <br />
<br />
have you tried it with a form tag and used the enctype parameter?<!--content-->On the toolbar of Outlook Express is an option to<br />
send/recieve E-Mail as Rich/Html. Either every user<br />
within the intranet needs to have this option checked or;<br />
<br />
Depending on how your intranet is configured,<br />
the administrator can enable this as default<br />
across the intranet.<br />
<br />
X-Msmail-Priority: Normal<br />
Content-Type: multipart/related;<br />
type="multipart/alternative";<br />
boundary="----=_NextPart_000_xxxx_xxxxxxxx.xxxxxxxxxx"<br />
Message-Id: <xxxxxxxxxxxxxxxxxxxxxxxxxxxx><br />
X-Received: 18 Oct 2003 17:12:50 GMT<br />
X-Priority: 3<br />
X-Mailer: Microsoft Outlook Express 6.00.2800.1158<br />
X-Mimeole: Produced By Microsoft MimeOLE V6.00.2800.1165<br />
=========================================================<br />
<br />
I still do not understand your insistance to do this with<br />
a mailto: within an anchor tag. Using a form submit with<br />
hidden fields for the address and message body elements<br />
would enable you to have more control of the content.<!--content-->I did try the form tag with ENCTYPE="text/html".<br />
<br />
I send a test message to myself. It does arrive but the body is empty and it is send with an alert that an unsafe attachment xxxxxx.DAT is included.<br />
<br />
<br />
Originally posted by Willy Duitt<br />
On the toolbar of Outlook Express is an option to<br />
send/recieve E-Mail as Rich/Html.<br />
<br />
<br />
You mean the option in Menu > Format > Rich Text (html) in the message window, correct? This option is selected.<br />
<br />
The thing is that I can't find out how to include a font tag in the message.<br />
<br />
Simpy adding <FONT face="arial">...</FONT> does not work. just as <br>, my initial question, doesn't work.<!--content-->Oh, wow, you can do that with form tags? I never knew that...<br />
<br />
I think I know so much in HTML but there's always these little details I never knew about before. I wish somehow I could evaluate what I don't know rather than what I already do know. This why I'd learn faster.<br />
<br />
This forums is a great help at least.<!--content-->
 
Back
Top