Attach File Through mailto URI

Kiran picture Kiran · Mar 3, 2010 · Viewed 19.5k times · Source

Is it possible to attach a file using "mailto:" redirect in javascript?

Something like this:

document.location = "mailto:"+recipient+"?subject="+subject+"&body="+msg+"?attach="+"file1.zip";

Answer

Martin picture Martin · Mar 3, 2010

No, you can not add an attachment to a message with the mailto: URL scheme.

mailto: only supports header values or text/plain content. See RFC 2368 for details.