MyBB Community Forums

Full Version: wrong mailaddress <username<[email protected]>>
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
By sending a mail to another user MyBB creates wrong Mail address.
MyBB creates: <username <[email protected]>>
but must be: [email protected]

How can I change it?

Here the error message:
Warning: mail(): SMTP server response: 501 Die Adresse des Absenders <username <[email protected]>> ist in KEN! nicht bekannt oder fehlerhaft. in C:\Programme\xampp\htdocs\portal\forum\inc\functions.php on line 210
You have to change it in the files.

inc/functions.php
Search for:
$from = "\"".$mybb->settings['bbname']." Mailer\" <".$mybb->settings['adminemail'].">";
Replace with:
$from = $mybb->settings['adminemail'];

member.php
Search for:
$from = $mybb->input['fromname'] . " <" . $mybb->input['fromemail'] . ">";
Replace with:
$from = $mybb->input['fromemail'];
Search for:
$from = $mybb->user['username'] . " <" . $mybb->user['email'] . ">";
Replace with
$from = $mybb->user['email'];

sendthread.php
Search for:
$from = $mybb->input['fromname'] . " <" . $mybb->input['fromemail'] . ">";
Replace with:
$from = $mybb->input['fromemail'];
Search for:
$from = $mybb->user['username'] . " <" . $mybb->user['email'] . ">";
Replace with
$from = $mybb->user['email'];