Forum Moderators: open

Message Too Old, No Replies

Adding subject line to mailto

         

zonkd

3:05 pm on Dec 16, 2005 (gmt 0)

10+ Year Member



When we do a mailto, as in mailto:j.smith@smith.com, how is the subject line added, please, Gurus? Cheers

tjhorne

3:20 pm on Dec 16, 2005 (gmt 0)

10+ Year Member



Here is a sample:

<a href="mailto: test@aol.com?subject=Questions/Comments">E-mail Me</a>

You can also prefill the message text to, let me know if you'd like a sample of that too...

rocknbil

6:58 pm on Dec 16, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Your better off using encoded characters for anything not a-z 0-9:

<a href="mailto:test@example.com?subject=Questions%2FComments">E-mail Me</a>

This is especially true of spaces. While some mail clients will correctly parse a space or a +, many won't:

<a href="mailto:test@example.com?subject=Questions%20or%20Comments">E-mail Me</a>

instead of

<a href="mailto:test@example.com?subject=Questions or Comments">E-mail Me</a>

zonkd

11:12 am on Dec 19, 2005 (gmt 0)

10+ Year Member



Many thanks, tjhorne, rocknbil, all noted and appreciated.

tjhorne, yes, I would appreciate seeing a sample of a message prefill. Cheers

tjhorne

2:01 pm on Dec 19, 2005 (gmt 0)

10+ Year Member



Here is what I use for simple e-mails that I have to send out on a regular basis, I don't know if I'd recommend it for anything really long.

<a href="mailto: helpdesk@example.com?subject=Test%20Message&body=Please%20add%20NAMEOFUSER%20to%20the%20MG%20group.">

[edited by: encyclo at 2:56 pm (utc) on Dec. 19, 2005]
[edit reason] examplified [/edit]

ken_b

4:04 pm on Dec 19, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



How do you hard code a line break in the body of the email message? So the message might look like this:

Name:
Address:
City:
State:

zonkd

8:56 am on Dec 20, 2005 (gmt 0)

10+ Year Member



Thanks very much, tjhorne, very much obliged to you. Cheers