Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

mailto link for large bodies

Tags:

mailto

I have a page upon which a user can choose up to many different paragraphs. When the link is clicked (or button), an email will open up and put all those paragraphs into the body of the email, address it, and fill in the subject. However, the text can be too long for a mailto link.

Any way around this?


We were thinking about having an SP from the SQL Server do it but the user needs a nice way of 'seeing' the email before they blast 50 executive level employees with items that shouldn't be sent...and of course there's the whole thing about doing IT for IT rather than doing software programming. 80(

When you build stuff for IT, it doesn't (some say shouldn't) have to be pretty just functional. In other words, this isn't the dogfood we wake it's just the dog food we have to eat.


We started talking about it and decided that the 'mail form' would give us exactly what we are looking for.

  1. A very different look to let the user know that the gun is loaded and aimed.
  2. The ability to change/add text to the email.
  3. Send a copy to themselves or not.
  4. Can be coded quickly.
like image 462
Keng Avatar asked Aug 08 '08 12:08

Keng


1 Answers

By putting the data into a form, I was able to make the body around 1800 characters long before the form stopped working.

The code looked like this:

<form action="mailto:[email protected]">
    <input type="hidden" name="Subject" value="Email subject">
    <input type="hidden" name="Body" value="Email body">
    <input type="submit">
</form>

Edit: The best way to send emails from a web application is of course to do just that, send it directly from the web application, instead of relying on the users mailprogram. As you've discovered, the protocol for sending information to that program is limited, but with a server-based solution you would of course not have those limitations.

like image 119
Lasse V. Karlsen Avatar answered Sep 19 '22 15:09

Lasse V. Karlsen