Send Mails Using HTML Only

Are you a Web Developer?

Richard Warepam
Dare To Be Better
4 min readFeb 26, 2022

--

“A Short but Informative article for Developers”

In this article, we will solely look at sending emails using HTML. You may be aware that you may send email content without using any HTML code. However, when we send email content, it is always preferable to utilize plain text format. The fundamental reason for this is that only plain text formats are well-supported by various email clients. So, the purpose of this article is to explain how to send emails using HTML only.

Step 1: HTML Email Tag

The <a> tag provides you with an option to specify an email address to send an email. While using the <a> tag as an email tag, you will use mailto: email address along with the href attribute.

To trigger the email program on your computer and open a new message window, use the mailto: example in the “href” attribute of the anchor (a) tag.

Step 2: How to “Add Multiple Email”?

HTML <a> tag provides you with the option to add multiple email addresses to send an email. The mailto attribute can also be used for sending an email to multiple recipients. This can be done by adding multiple email addresses in this attribute’s value separated by commas, as shown below:

Step 3: How to “Add CC and BCC”?

Well, as far I know, you can’t add CC and BCC in HTML. But HTML 5 allowed a new feature to control email clients from anchor tags. Using this attribute, we can send an email without any hassle. Just follow the steps shown below:

Foremost, open the new mail client using href= “mailto”. After that, you have to add all the recipients to the CC and BCC fields separated by comma(,). Here is an example:

That’s it! Go ahead and try this out on your site!

Step 4: How to “Add Subject of email”?

Using a subject with your email hyperlink can be a great help to your visitors. They are much more likely to click on a link that already contains a subject, especially if they can tell what the email is about at first glance.

So, what about inserting a subject line also in the email hyperlink? You can easily add a subject to your email links by using this syntax:

Complete Syntax with all Attributes of Email:

Conclusion:

Thanks so much for checking this blog out. I really hope you found it helpful and if you did then please take a moment to share it with your friends. Also, if you have any questions related to this blog or any other, then do feel free to follow and text me on my Twitter handle,

I generally reply within 24 hours of my inbox being filled, and I really like hearing from others who are interested in learning more about HTML.

If you are a new reader of my articles and if you like my writings. I write about some of my personal experiences and tips of coding and all about new technical topics like Web Development, Blockchain, NFTs. Please make sure you follow me on Medium. You can also check out more content on my website: https://richardwarepam.tech/blogs/

Richard Warepam, Software Developer.

--

--