0

I need to open an new outlook mail window with propulated attachments from the website when a user clicks some button or link in my application. I have no idea how to do that. I tried PHPMailer but it is not helping me.

Thanks alot

  • 3
    You can not control what app is associated with `mailto:`. So if I do not have outlook, your feature will not work. – Justinas Jun 28 '21 at 06:08
  • 2
    `PHPMailer` does not have such function to control `mailto:` behaviour; it's on user-side. PHP is on server-side. – Raptor Jun 28 '21 at 06:10
  • 1
    PHPMailer won't help because it won't open a new outlook mail box. – Mor Itzhak Jun 28 '21 at 06:13
  • Justinas, Outlook is associated with mailto: – Mor Itzhak Jun 28 '21 at 06:38
  • You can't guarantee that on all user machines. – ADyson Jun 28 '21 at 07:04
  • Anyway what you want is impossible, see https://stackoverflow.com/questions/5233556/using-mailto-to-send-email-with-an-attachment . It would be a security issue anyway, the browser cannot read the device's filesystem (which is a good thing) and therefore it cannot choose any attachments. – ADyson Jun 28 '21 at 07:04
  • Your question is probably closed as a duplicate of a PHPMailer question because the only way to get your application to generate an email containing attachments is to send the email from the server side, where you can add attachments from files on the server's disk (or files uploaded by the user, or files your application code creates itself). – ADyson Jun 28 '21 at 07:06

0 Answers0