Category: Coding

CodingLearnNew
MailTo Links

Getting Started with MailTo

Ever wonder how you click on a link and like magic it opens Outlook and has an email formatted with the ToSubject and a message already filled in?

Below we provide a few details on how just to do that.

The Code

This opens the user’s default mail program, creates a new message with the TO field already filled out.

<a href="mailto:test@someone.com">Email Us</a>

Pre-filled Address and Subject Line

This opens the user’s default mail program, creates a new message with the TO field already filled out. We also fill the SUBJECT line.

 

<a href="mailto:test@someone.com?subject=New Mail">Email Us</a>

Pre-filled Address, Subject Line and message (body)

This opens the user’s default mail program, creates a new message with the TO field already filled out. We also fill the SUBJECT line and add in a message (body) of the email.

<a href="mailto:test@someone.com?subject=New Mail&body=Hi">Email Us</a>

about us

Based in Edmonton, Alberta, Second Phase Development has worked on a variety of small, medium and large projects in a variety of sectors. We have experience in the home building industry, medical insurance, occupational health testing and many other industries.

Contact us

  • Address:
    Edmonton, AB

  • Phone:
    1-780-800-0889

  • E-Mail:
    info@secondphase.ca