Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

mailto with empty recipient?

Tags:

email

iphone

is there anyway that I can use "mailto" with empty recipient? I only want to supply the subject and the message body and then the user can write the to addresses on mail. I tried writing only a space but it didn't work.

like image 707
xenep Avatar asked Nov 20 '09 09:11

xenep


People also ask

Is mailto still used?

they're used everywhere—so people may be expecting the behaviour they're used to. on mobile devices, users pretty much have to set up a default email address, so clicking this link does exactly what most mobile users intend: it opens up their compose dialog.

How do I pass HTML formatted body in mailto?

The Mailto format does not support HTML code emails. Outlook was used at 2003, but to become compliant with the mailto: standard they removed that functionality. But you can Use %0D%0A for a line break in HTML body.

Why mailto is not working in HTML?

If mailto links don't open for you the way they should, a quick look at the system or browser settings should do the job. In Windows, head to Settings -> Apps -> Default apps. Scroll down and pick “Choose default apps by protocol” from the menu. For 'Mailto', choose the client of your choice.


1 Answers

This should do, I tested it.

mailto:?subject=your%20subject&body=your%20body 

And as HTML with correct escaping of the ampersand:

<a href="mailto:?subject=your%20subject&amp;body=your%20body">test</a> 
like image 86
Ben Fransen Avatar answered Sep 19 '22 15:09

Ben Fransen