-
Notifications
You must be signed in to change notification settings - Fork 0
berry.email.EMail
Nikos Siatras edited this page Oct 3, 2022
·
3 revisions
public function __construct(string $charset = "UTF-8")
EMail class represents a simple e-mail message.
require_once(__DIR__ . "/berry/email.php"); // Include berry email package
$htmlContent = '<h1>Email Title</h1>';
$htmlContent .= '<div>Dear customer, this is Elon Musk...</div>';
$email = new EMail();
$email->setSenderAddress("[email protected]");
$email->setSenderName("Elon Musk");
$email->setSubject("This is a test");
$email->setHTMLContent($htmlContent);
$email->setRecipientAddress("[email protected]");
// Send the email
if ($email->Send())
{
print "Email sent!";
}
else
{
print "Unable to send the email!";
}