2017-10-19, 04:11 PM
Hello!
I need help with a detail in the email settings.
I will try to explain very clearly:
My e-mail system is configured to send via SMTP and is working perfectly, all emails are being sent.
But the problem is that I can not add the sender's name (FromName) to Hearders, for example: My Board Name <[email protected]>.
In the class_mailhandler.php file, if the method of sending is via PHP the sender's name works normally:
If I try to use the same method for SMTP it generates an error log:
The error:
How can I set this up?
Thanks!
I need help with a detail in the email settings.
I will try to explain very clearly:
My e-mail system is configured to send via SMTP and is working perfectly, all emails are being sent.
But the problem is that I can not add the sender's name (FromName) to Hearders, for example: My Board Name <[email protected]>.
In the class_mailhandler.php file, if the method of sending is via PHP the sender's name works normally:
if($mybb->settings['mail_handler'] == 'smtp')
{
$this->from = $this->get_from_email();//<[email protected]>
}
else
{
//My Board Name<[email protected]>
$this->from = '"'.$this->utf8_encode($mybb->settings['bbname']).'"';
$this->from .= " <".$this->get_from_email().">";
}
If I try to use the same method for SMTP it generates an error log:
i f($mybb->settings['mail_handler'] == 'smtp')
{
//My Board Name<[email protected]>
$this->from = '"'.$this->utf8_encode($mybb->settings['bbname']).'"';
$this->from .= " <".$this->get_from_email().">";
}
else
{
//My Board Name<[email protected]>
$this->from = '"'.$this->utf8_encode($mybb->settings['bbname']).'"';
$this->from .= " <".$this->get_from_email().">";
}
The error:
if(!$this->send_data('MAIL FROM:<'.$this->from.'>', '250'))
{
$this->fatal_error("The mail server does not understand the MAIL FROM command. Reason: ".$this->get_error());
return false;
}
How can I set this up?
Thanks!