0

Can I add a attachment to a new outlook email using mailto tag of html.

Tried this : mailto:?subject=Pictures from PhotoAlbum&cc= &body=This is the body text&attachment=C:\\Users\\Public\\Pictures\\Desert.jpg

Does not work.

There seems to be solution in IE using ActiveX object which do not run on my IE browser but It will be better to have a solution working in Chrome.

Rameez khan
  • 1
  • 1
  • 2

1 Answers1

2

The mailto: protocol doesn't allow to add attachments. See mailto Protocol and The mailto URL scheme for more information.

Most probably you get the "Automation Server Can't Create Object" error which means that your browser's security settings are too low for the ActiveX control to run. You have to move your page into the trusted sites list and lower the ActiveX settings so it can run. Be aware, the ActiveXObject object is only available on Internet Explorer. So, if you need to get the code running in all browsers I'd suggest choosing another solution.

You may find the How to send an email from JavaScript thread helpful.

Community
  • 1
  • 1
Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45