MyBB Community Forums

Full Version: User to user email doesn't include return email address
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

When I get email from other forum users, the return email address is not included. If I hit "Reply" in my email client, the email goes to the admin's email. The only information given is the person's username in MyBB, which requires looking them up in MyBB, and even then, you won't get their email address.

I'd like to set up my forum so that if a person sends an email to another user, their email is at least included in the body of the email sent, so it's possible to reply. If that's not possible, then perhaps a required field for them to write in the return email address.

Does anyone know of some way to accomplish this?

I have MyBB version 1.4.4.

Thanks.
Maybe those users who sent you a message, have chosen to hide their email address.
Does it happen with any user that sends a message?
When you select to hide your email, you just don't have an option for people to send you a message. But the email never shows up with either setting. When your email is not hidden, then the option to send the member an email is available.

I had 2 of these where the user didn't include his email in the text of the message. There's no way I can get the email address. I have to copy the text out of the email, then look them up in the forum, and then press the email button (or PM button), and paste in their email, then reply.

I just want to be able to hit "reply" from my email client and have it go back to the person who wrote me.
There's an option that allows you to set additional parameters for the PHP mail() function. Go to your ACP -> Configuration -> Board Settings -> Mail Settings and there you can see a setting called "Additional Parameters for PHP's mail()".
I have never used this setting so I don't know exactly how it works, but I can guess it includes the last optional parameter of this function ([, string $additional_parameters ]). I'm not sure if it includes the string $additional_headers parameter, but if it does, you can add the extra header "From". Anyway, if it doesn't, similar thing can be done by the string $additional_parameters as well. I'd suggest that you ask or wait for the MyBB team to answer how to use this setting and what you should write there to get the sender's email address. You can find more information about mail() function here.
Thanks.

But I'm afraid I don't get that one. It seems to be a function for passing known data in. I'm trying to get data back out, that being the sender's email address.

Maybe there's a solution there that I don't see, but if there is, I don't see it.
Hi,

i had the same problem.
I fixed it by passing one parameter more to the build_message call in the function.php in line 457:

	$mail->build_message($to, $subject, $message, $from, $charset, $headers, $format, $message_text);

I changed the line to

	$mail->build_message($to, $subject, $message, $from, $charset, $headers, $format, $message_text, $from);

by this the return mail will be set in the build_message function.

Don't know if this is the best location to fix this but i didn't find another.
Andthis works for me.
Could someone tell me why this is not done by default?
It makes no sense that if an user recieves an email from another user and hits the reply button in his email programm, that the admin of the forum will get this mail.
(2009-05-09, 11:22 PM)amfa Wrote: [ -> ]Hi,

i had the same problem.
I fixed it by passing one parameter more to the build_message call in the function.php in line 457:

	$mail->build_message($to, $subject, $message, $from, $charset, $headers, $format, $message_text);

I changed the line to

	$mail->build_message($to, $subject, $message, $from, $charset, $headers, $format, $message_text, $from);

by this the return mail will be set in the build_message function.

Don't know if this is the best location to fix this but i didn't find another.
Andthis works for me.
Could someone tell me why this is not done by default?
It makes no sense that if an user recieves an email from another user and hits the reply button in his email programm, that the admin of the forum will get this mail.

Thanks, amfa. That works great.

I agree with you. That should be the default.

Note for other guys making this fix, the file name is actually functions.php and is found in the /inc directory.
I could not get this to work for me. My functions.php file has another parameter called "return_mail" in line 457. I tried to leave it replace it - nothing seems to work. Is there a proven method out there for this???