0

I saw on stackowerflow and use function for mail attachment with $_FILESdata but my problem is how to send email with attachment where is all files what need to be attached on the server?

Example:

  1. Users upload multiple files like images, zip, pdf doc in own console
  2. User when generating email choose what they want to send in attachment
  3. After choosing they can send email

I made complete functionality only missing part how to send that files like attachment not raw URL. I using standard mail() function for sending mail.

Ivijan Stefan Stipić
  • 6,249
  • 6
  • 45
  • 78
  • You can do it with the standard `mail()` function using the "Multi-Part Mime" format, but it is far easier to use a library for that like: https://github.com/PHPMailer/PHPMailer In my experience the "Multi-Part Mime" format is very fiddly. One space, or new line, in the wrong place and it won't work in some email clients. – KIKO Software Apr 22 '17 at 09:23
  • You're right! Thanks. – Ivijan Stefan Stipić Apr 24 '17 at 05:59

0 Answers0