php-simple-mail
php-simple-mail copied to clipboard
Provides a simple, chainable wrapper for creating and sending emails using the PHP mail() function.
Hi, Maybe it's already possible (or totally deprecated practice) and I missed the way to proceed, but would it be possible to add ``Content-Type: multipart/alternative`` so we could send both...
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...
I had to change the encodeUtf8() function to receive messages on Gmail and Yahoo: ```` public function encodeUtf8($value) { $value = trim($value); return mb_detect_encoding($value) === 'ASCII' ? $value : $this->encodeUtf8Word($value);...
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...
When sending an email only containing ASCII: ```php require_once("./class.simple_mail.php"); $from = '[email protected]'; $email = new SimpleMail(); $email->setFrom($from, 'Me') ->setParameters('-f'.$from) ->setReplyTo($from, '') ->setTo('[email protected]', 'Someone') ->setTo('[email protected]', 'Another one') ->setSubject('Subject') ->setMessage('Check your email.');...