Dynamically Using mailto:
etcroot
Posted on September 28, 2022
If you want to use mailto:
tag when you're handling emails you can do this simple trick to make life easier for the consumers.
Been using mailto:
the normal way until I found out you can actually customize it way more.
Here's what I use for my site (Slightly edited to not advertise)
`mailto:${contact}?subject=Application for ${title}&body=Hi ${username}, I am interested in your listing for ${title} that I found listed on [R E D A C T E D]. I would like to know more about it.`
The queries you're able to use are:
- mailto: (to set the recipent, you can separate this with commas)
- &subject= (this will set the subject for the email, use URL encoding if you're sending long messages)
- &body= (Same as subject but instead you're setting the actual email message)
- &cc= (Setting CC recipents)
- &bcc (Setting BCC recipents)
Hope this helped!
๐ ๐ช ๐
๐ฉ
etcroot
Posted on September 28, 2022
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.
Related
javascript Introduction to the WebCodec API - Real Time Video Encoding and Display
September 16, 2024