Search code examples
htmloutlookoffice365html-email

Email to link with email parameter opens outlook in browser starts new email


I am looking to replace for "mailto:" that redirect users to their outlook account in browser and do new email with the email in the link.

mailto: works for all users if they have set up default application outlook locally.

<a href="mailto:example@outlook.com">Send Email</a>

This opens the default email application to send new email to 'example@outlook.com'

I want to use this specifically for office365 outlook mail users, so instead of using default app, I need something for example:

<a href="http://sendemailusingoutlook?toEmail=example@outlook.com">Send Email</a>

And when user clicks on 'Send Email' It should open the office365 outlook in browser and have new email to 'example@outlook.com'

Is there any possible way to accomplish that?


Solution

  • Use the following url to launch email from the outlook online, you can modify the email address, subject, and email body.

    https://outlook.office.com/owa/?path=/mail/action/compose&to=emailname@domain.com&subject=Email%20Subject%20Here&body=some+content+goes+here
    

    Link to compose outlook email:

    https://outlook.office.com/owa/?path=/mail/action/compose
    

    Pass parameters in URL based on your usecase:

    &to=emailname@domain.com
    &subject=Email%20Subject%20Here
    &body=some+content+goes+here