miniBB ® miniBB®
miniBB Support Forums
 | Forums | Register | Reply | Search | Statistics | Manual |
The Other miniBB Support Forums / The Other /   

Admin does not receive emails

Page  Page 2 of 2:  « Previous  1  2  
Author marsbar
Associated Member
#16 | Posted: 14 Oct 2013 08:13 
Hi again, Paul.

Paul:
The most convenient way is to use email addresses related directly to your domain. 3rd party emails often may be blocked anyway.

Many thanks for taking the time to respond to my call for help. I understand what you are saying, and I always thought I was using an address that was associated with my domain.

I just spent quite some time with my web host, discussing the latest problem caused by their "sender domain policy". I was told to come back to you to check that my forum are configured correctly so that emails are sent as from an address at my domain. They emphasized that the "From" address must be an address at my domain, and it is something that is set at the application/script level. Their other suggestion was to set miniBB to use an external mail server via SMTP to send messages.

So, below are my email related settings:
$admin_email = bbadmin@mydomain; //admin's email is related directly to my domain. Please note: "bbadmin" is an email alias that forwards mail to my real mailbox which is "myusername"@mydomain - and it is hosted by my web host.

$reply_to_email=$admin_email; // use admin's email

$emailadmin=1; //so I can receive an email each time someone signs up

$emailuser=1; //so user can receive validation email

And below is a segment of the header of an email that FAILED to reach the forum admin (instead, it went into the maildir of the root user of my domain) when new person signed up using the email address "abc@yahoo.com".

X-PHP-Originating-Script: 59596:bb_functions.php
From: abc@yahoo.com
Reply-To: abc@yahoo.com
Errors-To: bbadmin@mydomain

My web host explained that the email bounced because the "From" address was not an address associated with my domain.

I also noticed the "Reply-To" address has also changed (despite $reply_to_email is set to be the same as admin's email) to the new member's email address! At that point my web host insisted that the irregularity was the result of misconfiguration of miniBB, and I should work with you to find a solution.

Would you be happy to cast your expert eye on my miniBB installation? I am at my wit's end. Is it time for premium support?

Author Paul
Lead Developer
#17 | Posted: 14 Oct 2013 13:08 
marsbar:
My web host explained that the email bounced because the "From" address was not an address associated with my domain.

Yes, it is about how the email about the new message comes from in miniBB - it uses the email of the message's poster.

I think, you may edit sendMail() function and supply all the original domain-related emails instead of the dynamic emails this functions generates. I won't change something for now just because of your own custom case. In the future releases, I may provide alternative replacement to this function, as I already was getting some notices about how this function "should" work. But each case is different - you want this, I want another thing, someone else requests for more. There is no common solution in this aspect, so the function should be just allowed to be overwritten; you may do it straight away, it's open source.

Author marsbar
Associated Member
#18 | Posted: 14 Oct 2013 14:24 
Thank you, Paul, your help is much appreciated. :)

Paul:
I think, you may edit sendMail() function and supply all the original domain-related emails instead of the dynamic emails this functions generates. [...] In the future releases, I may provide alternative replacement to this function, as I already was getting some notices about how this function "should" work. But each case is different - you want this, I want another thing, someone else requests for more. There is no common solution in this aspect, so the function should be just allowed to be overwritten;

Sounds perfectly reasonable.

As much as I dislike to see "core-destructive" solutions, I cannot see another way round the problem. And there is just another slight problem: my PHP skills are too low to make the necessary edits safely. I feel I should leave the task to an expert - and who would know more about miniBB than its author? Otherwise, what other feasible options do I have? Would you advise me to just wait for the alternative sendMail function that would be available in a future release?

I am unsure as to what to do, because I am not quite sure whether the admin user is the only person not receiving emails generated by miniBB. Users seem to be able to receive the auto-generated messages; e.g., account validation messages, and password reset messages. If Admin is the only one affected, perhaps Admin can just live with the inconvenience; otherwise, I should definitely try to get the problem sorted somehow. What do you think?

With thanks -
mb

Author Paul
Lead Developer
#19 | Posted: 14 Oct 2013 14:30 
It's a very simple change, and you don't have to wait, because I'm not sure where I will have to prepare the next release. Term is unknown so far.

The change is very easy, in this code:

$from_email="From: {$from_email}{$eeol}Reply-To: {$from_email}{$eeol}Errors-To: {$errors_email}{$eeol}Return-Path: {$errors_email}{$eeol}MIME-Version: 1.0{$eeol}Content-Type: text/plain{$charset}{$eeol}";

replace all {$from_email} and {$errors_email} references to the static domain-related address you have, i.e. info@yourdomain.xxx.

$from_email="From: info@yourdomain.xxx{$eeol}Reply-To: info@yourdomain.xxx{$eeol}Errors-To: info@yourdomain.xxx{$eeol}Return-Path: info@yourdomain.xxx{$eeol}MIME-Version: 1.0{$eeol}Content-Type: text/plain{$charset}{$eeol}";

it would be a very rude approach, but for temporarily solution it's ideal to understand, I guess.

Let me know if this helped.

Author marsbar
Associated Member
#20 | Posted: 15 Oct 2013 03:44 
Let me know if this helped.

Thank you, thank you, Paul--you are a champion! The modification works like a charm. :-D

With this modification being "core-destructive", will it likely to cause upgrade problems down the track? Or will it just be a matter of remembering to modify $from_email manually at each upgrade?

Author Paul
Lead Developer
#21 | Posted: 15 Oct 2013 11:56 
marsbar:
Or will it just be a matter of remembering to modify $from_email manually at each upgrade?

Yes, when you upgrade, it's the only mod to keep back.

But I suppose, with the next release, I will just make it possible sendMail() function possible to be overwritten in bb_specials.php, so you will be able to copy your current function there and keep it custom, comparing to the default, so no worries at the current stage anymore.

Author marsbar
Associated Member
#22 | Posted: 15 Oct 2013 12:42 
Paul:
But I suppose, with the next release, I will just make it possible sendMail() function possible to be overwritten in bb_specials.php, so you will be able to copy your current function there and keep it custom, comparing to the default, so no worries at the current stage anymore.

OK, until the next release, I should keep the current "rude, core-destructive hack" in bb_functions.php. I shall look forward to the next release -- non-core-destructive is the way to go. :) Thank you, Paul.

Page  Page 2 of 2:  « Previous  1  2 
The Other miniBB Support Forums / The Other / Admin does not receive emails Top

Your Reply Click this icon to move up to the quoted message

 Short link for this topic:

 ?
You are welcome to post anonymously, by entering a nickname with no password (if the similar Username has not been taken yet), or by leaving both fields empty. If you have a forums account, you can also sign in from this page without posting a message, or sign in and post at once.


Before posting, make sure your message is compliant with our forum posting rules. If not, it may be locked or deleted with no explanation.
 
 
miniBB Support Forums Powered by Forum Software miniBB ® Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contacts
Try the Captcha add-on: protect your miniBB-forums from the automated spam and flood.
Captcha Addon for miniBB