PHP code example of m8rge / alternative-mail
1. Go to this page and download the library: Download m8rge/alternative-mail library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
m8rge / alternative-mail example snippets
$email = new AlternativeMail();
$email->setFrom('[email protected]')
->addTo('[email protected]')
->setSubject('True story, bro')
->setTextBody("simple\ntext\nbody")
->send();
$email = new AlternativeMail();
$email->setFrom('[email protected]', 'Your brother')
->addTo('[email protected]', 'My Bro')
->addTo('[email protected]', 'My Bro, too')
->setSubject('True story, bro')
->setTextBody("simple\ntext\nbody")
->setHtmlBody('<hr />html message<hr />')
->addAttachment(__FILE__, 'forceName.php', 'application/x-php')
->send();