[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Can't get sendmail to put subject right...



On 7/27/00 8:24 AM -0700, tromine@sirius.com wrote:

>I still can't get a message body into the link, tho.

This form works for me, but not all web browsers implement mailto: 
links the same way, so YMMV. This looks like gibberish because the 
spacebar spaces are URL-encoded as %20 (percent-two-zero), and 
'newlines' are encoded as %0D (percent-zero-D).

mailto:bva@cruzio.com?subject=Email%20Test&body=Dear%20Friend:%0D%0DHe 
re%20is%20the%20info%20you%20requested:%0D%20%20XYZ%0D%20%20ABC%0D%20% 
20123

Some browser/emailer combinations will let you throw in cc and bcc 
lines as well.

Qualifications:

1. The longer the appended subject, body, etc, the greater the chance of error.
2. Be sure to URL-encode non-alphanumeric characters.
3. Technically, the '&' sign should be encoded too, and there is a 
movement afoot to persuade CGI coders to make our scripts accept ';' 
instead of '&' as the field separator in query strings. However, when 
using mailto: links in HTML docs, I've stuck with '&' because it 
doesn't work when encoded as %26 -- that is, then the '&' just 
becomes part of the query string, rather than separating the 
field=value pairs. Others must know more about this...
4. Probably limited to 255 characters or some other fairly tight constraint.
5. The worst experience I've had doing this is that, with some 
browser/emailer combinations, the appended body or cc fields just 
don't show up in the message window.

HTH

1;


- Bruce

_Bruce_Van_Allen___bva@cruzio.com__Santa_Cruz_CA_

# ===== Want to unsubscribe from this list?
# ===== Send mail with body "unsubscribe" to macperl-request@macperl.org