[MlMt] Safari to Pinboard?

Benny Kjær Nielsen mailinglist at freron.com
Sun Aug 25 08:34:14 EDT 2013


On 24 Aug 2013, at 19:48, Nitin Goyal wrote:

> Got it working with my scrappy Applescript :)

Great :-)

But...

> 	tell application "MailMate" to open location "mailto:" & 
> (theReceiver) & 	"?from=" & (theSenderl) & "
> 	&subject=" & (theTitle) & "
> 	&Body=" & (theURL) & "
> 	&send-now=yes" with trust

You MUST use the `url_encode` function from the Alfred example for each 
of the values above. Otherwise it'll break for certain kinds of input 
and, even worse, you run the risk of code injection. For example, I 
could construct a webpage title, which would result in a `mailto:` URL 
telling MailMate to send any file on your disk to any email address.

And just to be clear. It is **not**, in general, possible to use such 
`mailto:` URLs to make MailMate behave like that. It only works when 
opening a `mailto:` URL via AppleScript with the `with trust` bit seen 
above. (The reason you need the `with trust` above is that you want to 
“send now”.)

-- 
Benny
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freron.com/pipermail/mailmate/attachments/20130825/e3638fa9/attachment.html>


More information about the mailmate mailing list