Ok, so I have an add-on which sends an e-mail.
Overall, this is working perfectly. The e-mail is sent using the correct template, it is sent to the right person, it is sent from the default name and e-mail address for the board.
It is the latter I would like to change.
So... I have:
If I echo $fromEmail then the correct address as defined in Admin CP options is returned, yet when the e-mail is sent the from email address is simply the board default.
This could well be a bug - if it is feel free to move it to Bug Reports - though probably more likely is I've missed something
Thanks guys
Overall, this is working perfectly. The e-mail is sent using the correct template, it is sent to the right person, it is sent from the default name and e-mail address for the board.
It is the latter I would like to change.
So... I have:
PHP:
$options = XenForo_Application::get('options');
$fromEmail = $options->fromEmail;
$mail = new XenForo_Mail('my_email_template', $params, $visitor['language_id']);
$mail->send($toEmail, $toName, $headers = array(), $fromEmail);
If I echo $fromEmail then the correct address as defined in Admin CP options is returned, yet when the e-mail is sent the from email address is simply the board default.
This could well be a bug - if it is feel free to move it to Bug Reports - though probably more likely is I've missed something
Thanks guys