Dynadot .com transfer sale, only $10.12 with coupon code DYNA12, available while supplies last, ends October 31, 2026.

Mailto in html

Namecheap AuctionsNamecheap Auctions
Namecheap AuctionsNamecheap Auctions
Spacemail by SpaceshipSpacemail by Spaceship
Watch

xarzu

Established Member
Impact
0
I am trying to use the tag "mailto" in an HTML file to prompt the user to email me. Specifically, I want to have the subject and the body of the email message already filled in when the user sends me the email.

So far, I have managed to have a hyperlink where the body is already filled in:
HTML:
<a href="mailto::[email protected]?body='test'">this works</a>
I have also managed to have a hyperlink where the subject line is already filled in:

HTML:
<a href="mailto:usernamegmail.com?subject='the subject'">this works too</a>

But I have yet to figure out how do combine the two:
HTML:
<a href="mailto::[email protected]?subject='the subject and
the body'?body='test'">help</a>

Does anyone know how to do this?
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
It should be.

HTML:
<a href="mailto://[email protected]?subject=the%20subject%20and%20the%20body&body=test">help</a>

Ensure you url encode the subject and the body. You also do not need to enclose it like you had in single quotes.
 
0
•••
<html>
<body>
<a href=mailto:[email protected]?subject=web-site-inquiry&body=this>Contact Us</a>
</body>
</html>
 
Last edited:
0
•••
Code:
<a href="mailto:usernamegmail.com?subject=the%20subject&body=the%20body">Contact</a>
 
0
•••
DomainEasy: flexible LTO options. Close more domain deals with financing.

We're social

Escrow.com
Spaceship
Escrowly
CryptoExchange.com
Domain Recover
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back