2013-09-12, 05:04 PM
I was sending emails using MyBB 1.6.10 and my smtp server but the emails was arriving without the forum's name. Example:
From: <postmaster@example>
My target was that this email arrived like this:
From: Forum Messages <postmaster@example>
So, I solved this and now I'm sharing with yours. I found a problem in the code. To solve, just change this:
//%forum_folder%/public/inc/class_mailhandler.php
Line 283
I just added "global $mybb" and change the "From" header.
Hugs!
From: <postmaster@example>
My target was that this email arrived like this:
From: Forum Messages <postmaster@example>
So, I solved this and now I'm sharing with yours. I found a problem in the code. To solve, just change this:
//%forum_folder%/public/inc/class_mailhandler.php
Line 283
function set_common_headers()
{
global $mybb;
// Build mail headers
$this->headers .= "From: {$mybb->settings['bbname']} <{$this->from}>{$this->delimiter}";
if($this->return_email)
...
I just added "global $mybb" and change the "From" header.
Hugs!