Dave, I have a email link on a web page. Set so when you click it, the email opens with the address and subject line populated. I want to have the cursor OR Hello show up in the Body of the email. I am told ‘ONLY’ with forms but I am sure I did this years ago. Here is what I have so far:
“mailto:me@my-addr.com?Subject=Dear Kirk”
Do you know the code to finish it off?
First off, I have two articles worth reading in this regard: Avoid spam by omitting mailto links and hiding email addresses in HTML forms.
If you still want to use a mailto: link, then it turns out that there’s quite a rich language of different options you can specify to get the mailto link to work just as you desire.
According to what I found out about mailto links, you can specify more than one recipient by listing them as a comma-separated list (skip spaces, though), like this: mailto:joe@hisaddr.com,sue@heraddr.com,mary@heraddr.com. Easily done.
Now, for anything that would be passing additional information, you need to use the form ?name=value and if you specify more than one variable, you need to separate them with &, just as if you were specifying a method=”get” form, actually.
So, to specify the subject, you already know that you use subject=something, but you can also specify the “Cc” or “Bcc” recipients with, logically enough, cc=some@addr.com, or bcc=someone@else.com.
Finally, and this is what you asked about in the first place, to specify the body of the message, use body=. In fact, you can apparently specify more than one line of the body by using body= more than one time in the URL. So, putting it all together:
mailto:larry,dan?cc=mike&bcc=sue&subject=test&body=type+your&body=message+here
Try that, see how it works for you!
I got this to work successfully, but whereas a pre-defined Outlook email signature came up in all my other emails, when I added in this code the signature doesn’t come up anymore. Any ideas on how to add in code that will call the signature in?
The author of this article should update it to mention that “%0A” is the preferred way to add line-breaks.
There are clearly browser compatibility issues when you use multiple “body=” statements. It’s probably a fluke that it works at all in any browser.
Confirmed this works with %0A for line breaks.
This is the best example for mailto: with cc, bcc, subject, & body elements…
http://www.w3schools.com/html/tryit.asp?filename=tryhtml_mailto2
iam getting data from database and want it to display in outlook mail[body].
any solution!!!!
hi all
how can we values extracted from the vb code and put it into mailto body[im using asp.net programming]
any idea????
thanks
Sorry, again…
@Priti
Just try a BR html code, it works on default iPad mail app.
@Priti
Just try “”, it works on default iPad mail app.