send mails using concrete5

Submitted by remo - 4 years ago

When you have to send an e-mail, make sure you're using the official helpers. It will automatically log the mails to the database which might help you in case a message didn't get to its destination.

$mh = Loader::helper('mail');
$mh->setSubject('Hello from concrete5recipes.com');
$mh->setBody('Have a lovely day');
$mh->to('[email protected]', 'Remo Laubacher');
$mh->from('[email protected]');
$mh->sendMail();
Stats Categories Tags
comments powered by Disqus