Thursday, February 3, 2011

mailto link for large bodies

I have a page upon which a user can choose up to many differ 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 bee too long for a mailto link.

Any way around this?

Thanks.

  • 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:youremail@domain.com">
        <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.

  • Does the e-mail content need to be in the e-mail? Could you store the large content somewhere centrally (file-share/FTP site) then just send a link to the content?

    This makes the recipient have an extra step, but you have a consistent e-mail size, so won't run into reliability problems due to unexpectedly large or excessive content.

    From Jay Mooney
  • Yeah, the content does need to be in the email (it's a communication method with the end-users). It really does need to be all right there without the extra clicks but that's a good idea in general, Jay.

    I'm a big fan of on-click info.

    From Keng
  • 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.

    From Keng
  • 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.

    Thanks!

    From Keng

0 comments:

Post a Comment