PHP code example of werx / email
1. Go to this page and download the library: Download werx/email 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/ */
werx / email example snippets
$email = new \werx\Email\Message();
$email->clear();
$email->from('[email protected]', 'My Name');
$email->to('[email protected]');
$email->subject('your subject line');
$email->attach($attachment, 'attachment', 'filename.html', 'text/html');
$email->message('Message body goes here.');
$email->send();