eoghanobrien / php-simple-mail

Provides a simple, chainable wrapper for creating and sending emails using the PHP mail() function.
MIT License
206 stars 88 forks source link

Attachments in default mail client Mac OS #21

Open technobulka opened 7 years ago

technobulka commented 7 years ago

Sending email with attachments:

$send = SimpleMail::make()
    ->setTo($email_to, "")
    ->setFrom($email_form, "")
    ->setSubject("Test attachments")
    ->setMessage("Text")
    ->setHtml()
    ->setWrap(80)
    ->addAttachment('1.png')
    ->addAttachment('2.png')
    ->send();

Open in "Mail" and see this:

This is a multi-part message in MIME format. --ab6e7f92212c31cf6e8a62f3505b117e Content-type:text/html; charset="utf-8" Content-Transfer-Encoding: 7bit 
Text
--ab6e7f92212c31cf6e8a62f3505b117e Content-Type: application/octet-stream; name="1.png" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="1.png" iVBORw0KGgoAAAANSUhE...
--ab6e7f92212c31cf6e8a62f3505b117e Content-Type: application/octet-stream; name="2.png" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="2.png" JVBERi0xLjMK...
--ab6e7f92212c31cf6e8a62f3505b117e--

Tested in other programs and problems did not arise.

eoghanobrien commented 7 years ago

Hi, thanks for reporting this, which version of macOS are you using?

technobulka commented 7 years ago

OS - 10.10.5 Mail - 8.2