I've just put in a mailto: link in TeleMoose that has a pre-filled subject and body. What's interesting is that the body's content that you specify in the mailto link is actually interpreted as HTML, which is different than the standard (plain text), and how Apple Mail implements it.
So just be careful in generating a mailto: link; make sure that for the iphone, that you are generating HTML, not plain text -- e.g. for newlines, you'd use <br>; escape your < > & characters, etc.
> I've just put in a mailto: link in TeleMoose that has a pre-filled subject > and body. What's interesting is that the body's content that you specify in > the mailto link is actually interpreted as HTML, which is different than the > standard (plain text), and how Apple Mail implements it.
> So just be careful in generating a mailto: link; make sure that for the > iphone, that you are generating HTML, not plain text -- e.g. for newlines, > you'd use <br>; escape your < > & characters, etc.
I've been working on an example page for "mailto:", and tried what you said but I am having trouble figuring out how to escape <this>. The phone keeps interpreting it as a tag and removes it from the email.
Dan Wood wrote: > I've just put in a mailto: link in TeleMoose that has a pre-filled > subject and body. What's interesting is that the body's content that you > specify in the mailto link is actually interpreted as HTML, which is > different than the standard (plain text), and how Apple Mail implements it.
> So just be careful in generating a mailto: link; make sure that for the > iphone, that you are generating HTML, not plain text -- e.g. for > newlines, you'd use <br>; escape your < > & characters, etc.
> -- > Dan Wood > dw...@karelia.com <mailto:dw...@karelia.com>
> Sign up for a free 30-day trial and download 50 FREE songs from eMusic's > catalogue of over 2 million DRM-free tracks: > http://tinyurl.com/ypkzph
Kalle Alm wrote: > I've been working on an example page for "mailto:", and tried what you > said but I am having trouble figuring out how to escape <this>. The > phone keeps interpreting it as a tag and removes it from the email.
Ah, good catch. The trick is that special characters need to be escaped both for a URL and for the HTML page.
I get this by starting with the HTML, meaning that there are tags, and I've escaped & < > .... Then I url-encode the string (changing space to %20, & to %26, < to %3C, > to %3F, etc. And then, for good measure, I escape any entities to put that string into the web page (though that is not strictly necessary since all the & < > characters have already been converted).
For example, this chunk of HTML....
Check this out!<br><br>Harry Potter and the Deathly Hallows (Book 7) by J. K. Rowling.<br><br><http://www.amazon.com/o/ASIN/0545010225/ karelsofwa-20><br><br>... or from your iPhone, <http:// TeleMoose.com/d_0545010225>
> Ah, good catch. The trick is that special characters need to be > escaped both for a URL and for the HTML page.
> I get this by starting with the HTML, meaning that there are tags, > and I've escaped & < > .... Then I url-encode the string (changing > space to %20, & to %26, < to %3C, > to %3F, etc. And then, for good > measure, I escape any entities to put that string into the web page > (though that is not strictly necessary since all the & < > characters > have already been converted).
> For example, this chunk of HTML....
> Check this out!<br><br>Harry Potter and the Deathly Hallows (Book 7) > by J. K. Rowling.<br><br><http://www.amazon.com/o/ASIN/0545010225/ > karelsofwa-20><br><br>... or from your iPhone, <http:// > TeleMoose.com/d_0545010225>