Results 1 to 6 of 6

Thread: HELP_html email link with set subject & body content

  1. #1
    Join Date
    Jun 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Talking HELP_html email link with set subject & body content

    When you have a link that says "Email Me" on a web page, and when the email pops up the subject is already typed in. I know how to do that....

    QUESTION: Is there a way to set it so you also have a particular text in the body of the email and/or a form already typed in for your customer?

    I figure if you can do the subject that way there must be a way to do the text of the message that way too...does anybody know???

    I NEED YOUR HELP PLEASE!!!!! THANKS!
    Last edited by atlantajunction; 06-29-2005 at 09:15 PM.

  2. #2
    Join Date
    Aug 2004
    Location
    Brighton
    Posts
    1,563
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Using mailto, you can see how this template works:

    Code:
    <a href="mailto:YourName@YourSite.com? cc=someone@YourSite.com&bcc=someoneElse@YourSite.com &subject=Shipping%20Information%20Request&body=Please%20tell%20me%20if%20my%20order%20has%20shipped!">Shipping Request</a>
    cr3ative
    A retired member, drop me a line through my site if you'd like to find me!
    cr3ative media | read the stickies

  3. #3
    Join Date
    Jun 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default 1 More Question on html prepared email set up...?

    Thank you so much!!

    1 more question regarding the above topic...
    In the prepared email I was wanting to put a "form" (html) in the body so it would be easier for my customers to place their order. Is this possible? Or no?
    Thanks for your help...erica
    Last edited by atlantajunction; 07-08-2005 at 07:09 PM.

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Yes.
    You can use a server-side script (preferably) to send it, or you can use an action=mailto: form. However, be aware that this approach is somewhat unreliable, and the actual email received will be urlencoded. For example, if someone typed "My email is user@domain.com" in an input called message, it would appear to you as:
    message=My+email+is+user%40domain%2ecom

    This would be achieved like so:
    Code:
    <form action="mailto:webmaster@mysite.com">
    <input type="text" name="message"/><br/>
    <input type="text" name="name"/><br/>
    <input type="text" name="email"/><br/>
    <input type="submit"/>
    </form>
    So if someone was to fill in "Hello there," "John Smith," and "john@fsmail.net" respectively, you would (depending on browser) receive a message with an attachment called something like "attach.dat" containing:
    Code:
    message=Hello+there&name=John+Smith&email=john%40fsmail%2enet
    This is very unreliable. In fact, don't do it. I just tested it in Firefox, and it didn't like it at all.
    Try something in JavaScript - sorry, Mike, ECMAScript - like so:
    Code:
    <script type="text/javascript">
    
    var to = "me@mydomain.com";
    var re = "Message to the Webmaster";
    
    function submitMailForm() {
    var tform = document.mailform;
    window.location = "mailto:" + to + "?Subject=" + escape(re) + "&body=" + escape(tform.message.value) + escape("\n\n") + escape(tform.name.value) + " (" + escape(tform.email.value) + ")";
    }
    
    </script>
    
    <form name="mailform" onsubmit="submitMailForm();">
    <input type="text" name="message"/><br/>
    <input type="text" name="name"/><br/>
    <input type="text" name="email"/><br/>
    <input type="submit"/>
    </form>
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #5
    Join Date
    Jul 2005
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Another possible solution?

    Hi, How about trying this?

    Code:
    <a href="mailto:test@example.com?subject=Hello&Body=This%20is%20line%20one%0A%0Athis%20is%20line%20two%0A%0Aand%20this%20is%20line%20three.">Click here to Email me</a>
    It works for me in Outlook...not tested it across other email clients though.

    Decay.

  6. #6
    Join Date
    Jun 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks a lot...I will try this

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •