Send emails with processwire. wireMail()
<?php
// wireMail() Object oriented stle
$mail = wireMail();
$mail->to($adminEmail); // Email address TO. For multiple, specify CSV string or array.
$mail->from($email); // This may be an email address, or a combined name and email address.
$mail->subject($subject);
$mail->bodyHTML($email_body);
$mail->send();
// Or simple...
$mail = wireMail($to, $from, $subject, $textBody);
// or WireMailSMTP with a default sender emailaddress on config page
$mail = wireMail($to, '', $subject, $textBody);
// With options
$options = array(
'sendSingle' => true,
'cc' => array('person1@example.com', 'person2@example.com', 'person3@example.com')
);
$mail = wireMail($to, $from, $subject, $textBody, $options);