Topic Reply Notification Email NOT Working...

This is an archive of the phpBB 2.0.x support forum. Support for phpBB2 has now ended.
Forum rules
Following phpBB2's EoL, this forum is now archived for reference purposes only.
Please see the following announcement for more information: viewtopic.php?f=14&t=1385785
User avatar
Blastkd
Registered User
Posts: 69
Joined: Tue Mar 08, 2005 3:54 am
Location: Suburb of Boston, Mass

Topic Reply Notification Email NOT Working...

Post by Blastkd » Sat Apr 16, 2005 12:53 pm

All other email functions of the forum are working except the Topic Reply Notification.

For some reason, the forum is not sending a email when someone replies to the topic.

Any suggestions would be gretaly appreciated.

Thanks

PS. YES The Notify Me buttons are being checked.

User avatar
zeroK
Former Team Member
Posts: 20964
Joined: Sun Jan 20, 2002 7:36 pm
Location: Klagenfurt / Austria
Contact:

Post by zeroK » Sat Apr 16, 2005 1:12 pm

For support requests please use the draft here :-)
http://www.phpbb.com/phpBB/viewtopic.php?t=128123
Image My weblog | gamerslog.com | No support via PM or ICQ or email - If you don't know a term or a program mentioned in a post -> Google is your friend

balto
Registered User
Posts: 13
Joined: Fri May 06, 2005 3:44 pm

Reply Notification Mail (Only) Not Working

Post by balto » Tue May 10, 2005 5:42 pm

URL: http://68.178.129.27/forum/index.php (test forum)
Template(s) used: subSilver
Any and all MODs: none
Do you use a port of phpBB: no
Version of phpBB: 2.0.15 (symptoms also occur in another test forum on the same hosting provider using 2.0.11)
Version of PHP: 4.3.11
Which database server and version: MySQL 3.23.55
Host: GoDaddy.com (Linux)
Did someone install this for you/who: self-installed (an automated installation as part of GoDaddy's supported software on a different domain, also hosted with GoDaddy, has the same symptoms)
Is this an upgrade/from what to what: No - new installation.
Is this a conversion/from what to what: No - new installation.
Have you searched for your problem: Yes.
If so, what terms did you try: e-mail notify; notification AND e-mail; notify AND e-mail; topic AND notify AND (e-mail OR email); topic AND notification AND (e-mail OR email); notification AND e-mail AND not working
State the nature of your problem: Same symptoms as Blastkd: account activation e-mail goes out fine; PM notification e-mail goes out fine; topic-reply notification does not occur. No apparent error messages. I noted the thread for item 255710 (http://www.phpbb.com/phpBB/viewtopic.php?t=255710), but I would prefer not to use SMTP. It would seem reasonable that if PM-notification works without SMTP, reply-notification should work, too.
Do you have a test account for us: Yes, however since this is only a test forum, you're welcome to set up test accounts (be gentle). Visual confirmation is enabled.

dmpp
Registered User
Posts: 19
Joined: Tue May 10, 2005 6:57 pm
Location: Toronto, On, Canada
Contact:

Post by dmpp » Tue May 10, 2005 9:16 pm

URL: www.entertocontinue.com
Template(s) used: modification of DAJ_Glass that I made
Any and all MODs: I cannot remember all of them that I applied (there were about 10) SQR,
Do you use a port of phpBB: not sure (I downloaded it from phpBB.com's site)
Version of phpBB: 2.0.15 (had this same prob. with 2.0.14)
Version of PHP: 4.3.10
Which database server and version: mysql (unsure of the ver)
Host: not sure what info you're looking for
Did someone install this for you/who: I installed it
Is this an upgrade/from what to what: I installed a new board at 2.0.14 and updated it to 2.0.15 myself
Is this a conversion/from what to what: nope
Have you searched for your problem: I didn't find any solutions that seemed to have worked.
If so, what terms did you try: reply notification not working
State the nature of your problem: When someone posts a reply to a post, it does not notify people that the reply was posted (even if they've selected that they should be notified of replies). However, they are notified that they have a PM waiting... so I know that e-mailing is working.
Do you have a test account for us: Nope, but feel free to create an account.

balto
Registered User
Posts: 13
Joined: Fri May 06, 2005 3:44 pm

Post by balto » Wed May 11, 2005 10:49 pm

OK, from piecing together a (numbing) variety of topics/posts, here's what I think is happening....

New-account mail is going out because it's addressed directly to the new user. Private-message mail is going out because it's addressed to a specific user. Topic-reply-notification mail is not going out because (if I understand correctly), it is intentionally addressed to an invalid mail address (!), and everyone who has requested notification on that topic is included in the BCC line to keep their various addresses from being revealed to everyone else tracking that topic. Not surprisingly, some hosting services have a problem with intentionally sending out mail to invalid addresses, so they quietly deposit the messages in the bit-bucket.

Soooo, one approach that seems promising is if I can find where in the code I need to venture, I might be able to insert a TO address for a real mailbox that I can configure to discard all incoming messages. This will give the reply-notification e-mail a valid TO address and (assuming that the host's spam defenses don't toss messages with too many BCC recipients) get past the most likely source of the missing topic-reply-notification e-mails. If someone familiar with the code can help me figure out how to hard-code a valid "TO" address, and if it solves the problem, I'll post a MOD request to add a configuration option for an omnivorous e-mail destination address to provide an easier solution for the mysterious missing-notification e-mails. (Meanwhile, of course, if I can prove that this really is the problem by implementing this work-around, then I can try to convince my hosting service to permit the e-mails to go, as-is. However, from my experience, this seems like a longer-term project.)

So how 'bout it? Any of you code-jockeys have any thoughts on what/where/how I have to do/go/mod to try this kluge?

dmpp
Registered User
Posts: 19
Joined: Tue May 10, 2005 6:57 pm
Location: Toronto, On, Canada
Contact:

Post by dmpp » Thu May 12, 2005 3:21 am

I'll go through code to see if something sticks out to me...

I believe that it would be inside /includes/emailer.php

Having said that... it would be nice if we could control the e-mail address in the admin panel... maybe it would be something like "Default e-mail account for sending from:"

what I don't get is that when I send an e-mail to all users on the board, that works... I would think it would be the same function to do that...

User avatar
Lumpy Burgertushie
Registered User
Posts: 66473
Joined: Mon May 02, 2005 3:11 am
Contact:

Post by Lumpy Burgertushie » Thu May 12, 2005 4:14 am

I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

dmpp
Registered User
Posts: 19
Joined: Tue May 10, 2005 6:57 pm
Location: Toronto, On, Canada
Contact:

Post by dmpp » Thu May 12, 2005 11:35 am

looks like this might help...

http://phpbbhacks.com/download/3937

I'm going to try it out....

if that fails, I'm downloading the full install of phpbb and going to compare the emailer.php files...

dmpp
Registered User
Posts: 19
Joined: Tue May 10, 2005 6:57 pm
Location: Toronto, On, Canada
Contact:

Post by dmpp » Thu May 12, 2005 11:51 am

I've modded the emailer.php file based on the link I posted....

lines 212 and 227...

I also compared the file to the one incl'd in the full installation... and it was identical... so I'm hoping that this fixes it... guess we'll see...

dmpp
Registered User
Posts: 19
Joined: Tue May 10, 2005 6:57 pm
Location: Toronto, On, Canada
Contact:

Post by dmpp » Thu May 12, 2005 12:08 pm

the mod doesn't seem to have worked... waiting for other's on my board to test it out...

dmpp
Registered User
Posts: 19
Joined: Tue May 10, 2005 6:57 pm
Location: Toronto, On, Canada
Contact:

Post by dmpp » Thu May 12, 2005 3:22 pm

I think this is the problem...

When someone submits a new message to a topic, if someone has a topic being watched, the script should write the message to the DB, then check the phpbb_topics_watch and if someone has it watched, it then generates an e-mail.

To be honest, I have no idea if the problem is in checking the the phpbb_topics_watch or if the problem is sending the e-mail.

Anyone know if there's a way to check either?

balto
Registered User
Posts: 13
Joined: Fri May 06, 2005 3:44 pm

Hack for FROM Address and Mass-Mailing Test Results

Post by balto » Thu May 12, 2005 4:23 pm

First, thanks to Lumpy for the suggestion about checking at phpBBHacks(http://phpbbhacks.com/searchresults.php ... &Submit=Go), but no, I didn't find anything in there that looked promising for the topic-notification problem. These all seem to assume that the existing functions work, so they're more oriented to adding functionality.

Specifically, dmpp has tried one of the hacks - with and without further custom mods - without much luck. This hack seems more oriented to a potential problem with the sender's address, and my hosting service doesn't appear to have a problem with the origination address that the mail functions use. (Besides, I notice on the phpBBHack forums that there's some debate there whether this particular patch is compatible with phpBB versions above 2.0.4.) In any case, that hack doesn't seem to have fixed the notification-reply problem for dmpp.

dmpp pointed out that the mail works for mass e-mails. I hadn't thought to test this before, but I've confirmed that on the test system I'm using, the mass e-mails work. In this case, the TO, FROM, and REPLY-TO addresses are the board administrator's address. The recipients are (apparently) in the BCC.

Since the use of the BCC for the recipients seems the same in the topic-notification routine and in the mass-mailing routine, it does raise the question of why a different TO addressing scheme appears to be used for each. Specifically, I notice that on my un-MOD'd test forum, the mass e-mail uses the board administrator's TO address, presumably because the administrator would like to receive a copy of what he's sending to verify that the mailing went out. On the topic-notification e-mail that I receive from this forum (the phpBB support forum), it is addressed to "Undisclosed-recipients:" which is clearly an invalid e-mail address and, for that matter, not even a valid e-mail address format.

In this day and age of service providers risking blacklisting of their mail servers from as little as one spam message, I can understand why hosting services might be uncomfortable with sending out messages from a shared server to obviously fictitious e-mail addresses. A separate issue is how many rules-based spam-blockers at the recipients' locations will block such a message, even if it's successfully sent. (I've confirmed that this isn't my problem in testing the topic-reply-notification e-mail.)

So it looks as though a promising approach is to understand where in the code (and why in the world) the mass e-mail TO address differs from the topic-reply-notification e-mail TO address, with the goal being to find some way of putting in some valid TO address on the topic-reply-notification e-mail. The TO address to be used probably needs not to be the administrator's e-mail, since the administrator could become inundated on a large board. It should, however, be a validly formatted e-mail account that the administrator can set up to receive-and-drop all incoming mail.

I'm hopeful that this narrows down the code search a bit for those who know the phpBB code, and that someone can offer some guidance as to how to find it and how to change it (preferably without breaking it :wink: ).

Anyone have any insights/thoughts?

dmpp
Registered User
Posts: 19
Joined: Tue May 10, 2005 6:57 pm
Location: Toronto, On, Canada
Contact:

Post by dmpp » Thu May 12, 2005 4:59 pm

I'm looking in /posting.php , and I think it's in there... around line 565 (in mine... I don't remember if there were any mods that I made to this file... I don't think so)

I might be wrong about the line #, but this file seems to have a lot of code for editing, creating, replying to, etc. for posts....

just found this site... thought it might help us narrow it down.

http://www.phpbbhacks.com/forums/viewtopic.php?t=21193

dmpp
Registered User
Posts: 19
Joined: Tue May 10, 2005 6:57 pm
Location: Toronto, On, Canada
Contact:

Post by dmpp » Thu May 12, 2005 6:00 pm

so I was in the admin panel, and I saw the SMTP server, user name, pwd... I filled those in and set it to use that....

still didn't work.... lol.... but the other e-mail functions (sending e-mail to users, pm notification, etc) still appear to work...

Also, I noticed that the search function isn't returning results...

balto
Registered User
Posts: 13
Joined: Fri May 06, 2005 3:44 pm

BINGO!

Post by balto » Thu May 12, 2005 9:29 pm

Thanks to dmpp for the pointer to http://www.phpbbhacks.com/forums/viewtopic.php?t=21193. This helped me find what I needed in the code.

It turns out that the problem really is the bogus TO address in the topic-reply-notification e-mail. Happily, there appears to be an easy "fix" (not elegant, but easy and effective). In your phpBB forum directory, in the Includes folder, there is a file called emailer.php. My editor doesn't give me line numbers, but search for the string "Undisclosed-recipients:" and replace it with a valid e-mail address. (I suspect that it would work with an invalid e-mail address with a valid e-mail format, but I was concerned that if the bounces from a bad address became a problem, the hosting service might not take it well. So I'm using a real address that just eats incoming mail.)

Note that although I replaced the string, including the final colon, there is a semicolon after this that I did not remove. The semicolon is probably unnecessary, but it doesn't hurt anything, so I left it in the file... just in case.

I updated the emailer.php file with the change and replied to a topic in my test forum. Sure enough, topic-reply-notification e-mails went out successfully to both the new address that I plugged into the emailer.php file and to the users subscribed to the topic. So although my testing hasn't been what I'd call extensive yet, I think we've got a "fix."

If the others who have been having this problem can try this patch, please update this topic with your results. If it turns out to work OK for everyone with no apparent side-effects, then I'll post a mod-request to add the ability to set this e-mail address through the administrator's configuration page.

Thanks to everyone for all your help with this.

Locked

Return to “2.0.x Support Forum”