List PHP Plugin with PHP for sending an Email

xycofryx

Member
Joomla: 3.9.1
Fabrik:3.9

How do I combine the capability to send email after a code has been executed using the List PHP Plugin?
 
There's a simple Fabrik helper:

Code:
$res = FabrikWorker::sendMail(
   $emailFrom, // email from address, usually the J! global config setting
   $fromName, // email from name, usually the J! global config setting
   $to, // single email address string, or array of address strings
   $subject, // string
   $msg, // message body, eithe HTML formatted or plain text
   $html, // OPTIONAL - defaults to true to use HTML format, false for plain text
   $cc, // OPTIONAL - Cc address
   $bcc, // OPTIONAL - Bcc address
   $filepath, // OPTIONAL - full path to file attachment
   $replyEmail, // OPTIONAL - reply to email (defaults to $emailFrom)
   $replyEmailName // OPTIONAL - reply to Name (defaults to $fromName)
);

Everything after $mg is optional, so the simplest form is ...

Code:
$config    = JFactory::getConfig();
$to = "someone@somewhere.com";
$subject = "a subject";
$msg = "an HTML<br />formatted<br /><b><i>message</i></b><br />";

$res = FabrikWorker::sendMail(
   $config->get('emailfrom'),
   $config->get('fromname'),
   $to,
   $subject,
   $msg
);

The $to arg can be a single email address, or an array of addresses.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top