3

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?

Dharman
  • 30,962
  • 25
  • 85
  • 135
Lahar Shah
  • 7,032
  • 4
  • 31
  • 39

2 Answers2

6

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
Lahar Shah
  • 7,032
  • 4
  • 31
  • 39
bstory
  • 852
  • 9
  • 28
-1

as of 2023 the syntax is

https://outlook.office.com/mail/deeplink/compose?to=service@domain.com&subject=Customer%20Service%20Request&body=Add%20Your%20Request%20here

see How to mailto to office 365? as well

entorb
  • 1
  • 1