You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I use the code below: php $email->setFrom('[email protected]', 'From') ->setTo('[email protected]', 'TO') ->setSubject('Mail \'subject') ->setReplyTo('[email protected]') ->setHtml() ->setMessage('My message') ->addAttachment('htaccess.txt') ->send();
I get the mail like this:
This is a multi-part message in MIME format. --27a6f9f7396604b2e7d9002567a15c0b Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable My message --27a6f9f7396604b2e7d9002567a15c0b Content-Type: application/octet-stream; name="=?UTF-8?B?aHRhY2Nlc3MudHh0?=" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="=?UTF-8?B?aHRhY2Nlc3MudHh0?=" PElmTW9kdWxlIG1vZF9yZXdyaXRlLmM+CglSZXdyaXRlRW5naW5lIE9uCglSZXdyaXRlQ29uZCAl e1JFUVVFU1RfRklMRU5BTUV9ICEtZgoJUmV3cml0ZUNvbmQgJXtSRVFVRVNUX0ZJTEVOQU1FfSAh LWQKCVJld3JpdGVSdWxlIF4oLiopJCBpbmRleC5waHAvJDEgW0xdCjwvSWZNb2R1bGU+ --27a6f9f7396604b2e7d9002567a15c0b--
When I use the code below:
php $email->setFrom('[email protected]', 'From') ->setTo('[email protected]', 'TO') ->setSubject('Mail \'subject') ->setReplyTo('[email protected]') ->setHtml() ->setMessage('My message') ->addAttachment('htaccess.txt') ->send();
I get the mail like this:
This is a multi-part message in MIME format. --27a6f9f7396604b2e7d9002567a15c0b Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable My message --27a6f9f7396604b2e7d9002567a15c0b Content-Type: application/octet-stream; name="=?UTF-8?B?aHRhY2Nlc3MudHh0?=" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="=?UTF-8?B?aHRhY2Nlc3MudHh0?=" PElmTW9kdWxlIG1vZF9yZXdyaXRlLmM+CglSZXdyaXRlRW5naW5lIE9uCglSZXdyaXRlQ29uZCAl e1JFUVVFU1RfRklMRU5BTUV9ICEtZgoJUmV3cml0ZUNvbmQgJXtSRVFVRVNUX0ZJTEVOQU1FfSAh LWQKCVJld3JpdGVSdWxlIF4oLiopJCBpbmRleC5waHAvJDEgW0xdCjwvSWZNb2R1bGU+ --27a6f9f7396604b2e7d9002567a15c0b--
But if I remove the method setHtml()
php $email->setFrom('[email protected]', 'From') ->setTo('[email protected]', 'TO') ->setSubject('Mail \'subject') ->setReplyTo('[email protected]') //->setHtml() ->setMessage('My message') ->addAttachment('htaccess.txt') ->send();
I get the mail with attchment
The text was updated successfully, but these errors were encountered: