PHP code example of o2system / email
1. Go to this page and download the library: Download o2system/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/ */
o2system / email example snippets
use O2System\Email;
// Create new email message
$message = new Email\Message();
$message->from( '[email protected]', 'O2System Framework' );
$message->subject( 'Testing email message' );
$message->body('This is testing email message body content.');
$message->to('[email protected]', 'Steeven Andrian Salim');
$message->priority( Email\Message::PRIORITY_HIGHEST );
// Create new email spool
$spool = new Email\Spool([
'protocol' => 'mail'
]);
$spool->send( $message );