1. Go to this page and download the library: Download originphp/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/ */
use Origin\Email\Email;
$Email = new Email();
$Email->to('[email protected]')
->from('[email protected]')
->subject('This is a test')
->textMessage('This is the text content')
->send();
use Origin\Email\Email;
$Email = new Email();
$Email->to('[email protected]')
->from('[email protected]')
->subject('This is a test')
->textMessage('This is the text content')
->htmlMessage('<p>This is the html content</p>')
->format('both')
->send();
use Origin\Email\Email;
$Email = new Email());
$Email->to('[email protected]')
->from('[email protected]')
->subject('This is a test')
->htmlMessage('<p>This is the html content</p>')
->format('html')
->send();
use Origin\Email\Email;
$Email = new Email();
$Email->to('[email protected]')
->from('[email protected]')
->subject('This is a test')
->textMessage('This is the text content')
->addAttachment($filename1)
->addAttachment($filename2,'Logo.png')
->send();
use Origin\Email\Email;
$Email = new Email('gmail');
use Origin\Email\Email;
$Email = new Email();
$Email->to('[email protected]')
->from('[email protected]')
->subject('This is a test')
->textMessage('This is the text content')
->account('gmail')
->send();