Navigate
Home
ArticleWiki
Forum
Journal
Search
Newsletter
Links
Tech News
expertsrt.com
Welcome Guest.
Username:

Password:

Remember me

Email Notification problem.
Welcome, Guest. Please login or register.
November 20, 2008, 03:37:30 AM
11306 Posts in 1249 Topics by 501 Members
Latest Member: rosaline
Experts Round Table Network  |  Serverside Technology  |  PHP  |  Email Notification problem. « previous next »
Pages: [1]
Author Topic: Email Notification problem.  (Read 577 times)
COBOLdinosaur
ERT.com Admin

Offline Offline

Posts: 481



WWW
« on: December 13, 2005, 05:33:49 AM »

This thread is to track the Email notif problems.

The last report email notif is Dec 6 at 3:11 am GMT  There could be some after that but Coral said that was the last he got.

We have plaed around with it a lot to get group mailing and watch forum working, and the Watch forum in particulare was a lot of problems.  The code in the posting page ti a real mess, and we have played with teh mailer functions.  

Right now there are notifs on PMs, but nothing on postings; so we ned to get it fixed, even if we have to scrap the code and put somethign else in, we need to have notifs working.
Logged
sajuks
Site Builder

Offline Offline

Posts: 18


« Reply #1 on: December 13, 2005, 09:25:58 PM »

As a quick fix couldnt we copy the original emailer.php ( am assuming u've played with this file ) from a new download or backup and see if its working ?
In the meantime we could also compare the two files to see whats missing.
Logged
Huntress
Administrator
*
Offline Offline

Posts: 133



WWW
« Reply #2 on: December 14, 2005, 04:41:43 AM »

Mine stopped at about the same time as coral1's but I still get notifs for PMs.  I had initially thought it was due to a bouncing email addy so I changed it.  Obviously it didn't help.
Logged
COBOLdinosaur
ERT.com Admin

Offline Offline

Posts: 481



WWW
« Reply #3 on: December 14, 2005, 05:35:06 AM »

Saju,

The code in emailer.php is used for PM notifs as well, and they are working.  Plus the code has not been touch in quite a while.

It is most likely that the problem is in:
www/expertsrt.com/phpBB2/includes/functions_post.php

The postings code that calls those functions have been heavily modified and the functions themselves have had changes. There has been a problem installing mods that use postings and the posting functions because some incompatibilites made automated installation impossible, and there were problems when we upgrade from version 2.0.17 to 2.0.18 of PHPBB.

If we try to just put in an original version of any of the code piecemeal; it is going to blow up things all over the place. There were a dozen mods installed, and then we upgraded the PHPBB, and added some additional mods.  The way the code is written the inter-dependencies would force us to back out everything, plus the manual tweaks we did ourselves.

If it cannot be fixed any other way, i will just scrapt the PHPBB code for posting and mailinf and re-write it but that is going to take some time.  Matt is setting up a parallel area at phpalpha.expertsrt.com but I don't know how long befroe that will be usful to us.

Meanwhile the with no notifs the site looks dead, and the number pf visits is down significantly in the last week.
Logged
nicholassolutions
Administrator
*
Offline Offline

Posts: 133



WWW
« Reply #4 on: December 14, 2005, 11:57:13 AM »

Sorry I've not commented until now. I'm kind of swamped at the moment, but this is at the top of my list of things to do when I get a minute. Anyone on the PHP team, *please* feel free to have a look and this and make any changes you think will help (just make sure you backup originals, comment any additions including a timestamp, and comment-out code instead of deleting it).

Matt
Logged
nicholassolutions
Administrator
*
Offline Offline

Posts: 133



WWW
« Reply #5 on: December 14, 2005, 01:14:06 PM »

OK, I have phpBB set up at the alpha domain now. Only problem is that when you log in, it takes you to the main board on www.expertsrt.com. I got around that by copying the session id cookie and changing the domain to phpalpha, but there should probably be a better way by changing one of the config files. But either way, it works at least passably, and we can abuse the hell out of it without worrying about messing up people's use of the main site.

Now on to getting the notifs working again. Roy -- can you make a dummy account for us to use? I just want to start a dummy thread, and make posts from another account so I can tell if the notifs are going out. Otherwise I'll have to wait for other people to reply to threads each time I make a change.

Matt

PS: I protected the phpalpha domain using the same htaccess file as we have for the PHP area. If we decide we don't need the security, we can always remove it.
Logged
COBOLdinosaur
ERT.com Admin

Offline Offline

Posts: 481



WWW
« Reply #6 on: December 14, 2005, 03:18:20 PM »

You can create as many accounts as you want just by registering them.  The only thing it checks it that the email address is unique.  We are currently not doing a verification. If you need extra email accounts let me know and I will set some up on the mail server.

The intent was to add verification just before we go live.  For development it is best not to restrict dup accounts while we are testing.
Logged
COBOLdinosaur
ERT.com Admin

Offline Offline

Posts: 481



WWW
« Reply #7 on: December 14, 2005, 03:43:45 PM »

I added this to the over all header in teh templates for phpalpha:

<base href="http://phpalpha.expertsrt.com/phpBB2/index.html">

That will set all relative urls to the right path within the subdomain.  Absolute urls will still jump outside the subdomains, so posted links will take you out.

It is the way I keep the preview site on beta.  On that one I also have a re-direct to handle the absolute urls that point to live pages, but we probably don't want to do that for alpha.
Logged
nicholassolutions
Administrator
*
Offline Offline

Posts: 133



WWW
« Reply #8 on: December 16, 2005, 02:58:52 AM »

all right I think I've figured this out. The problem is the BCC. If a BCC header is added, the email does not go through, even though mail() returns true. At first I thought it might be because of the order of the headers, but I cleaned them up and put them in a more stanard order, and it didnt help. I even tried inserting phpMailer code using mail() as the delivery method, and the same thing happened. I also tried adding the '-t' flag to the sendmail path to make it read the headers for recipients, with no luck. When I change the BCC to plain To:, it works, but of course discloses the recipients, which is not what you want if the email is going to a group.

My guess is that the server is somehow tossing out emails that contain BCC headers, at least when sent using PHP's built-in mail function.  The best solution would be for you to set up an email account for sending mails from phpBB, and then we can use phpMailer to send them via smtp (it looks like phpBB also has built-in smtp support, so we could possibly use that). If for some reason the host absolutely doesn't allow BCC, I guess we can mod the code to send individual emails over and over, although that is extremely inefficient, and the host needs a kick in the balls if they somehow won't allow you to BCC. My guess is that it will work via SMTP though.

Oh yeah, I almost forgot: Arrrrrrrrrgggggggggggggggggggggggggggg!!!!!!!!
What a stupid mess. I was hoping this would actually be a legitimate problem that I could fix by carefully going through the code, but it turns out to be some stupid configuration and/or PHP mail() issue. What a PITA. Oh well, at least it's pretty clear what is wrong now and we can get it fixed without scrapping the functionality.
Logged
nicholassolutions
Administrator
*
Offline Offline

Posts: 133



WWW
« Reply #9 on: December 16, 2005, 03:04:44 AM »

BTW, the problem eventually traces back to emailer.php, in the send() function around line 225 (i'd thought it was in post.php or functions_post.php at first)....there, now I won't forget all about this when I come back...
Logged
COBOLdinosaur
ERT.com Admin

Offline Offline

Posts: 481



WWW
« Reply #10 on: December 18, 2005, 08:52:29 AM »

You should get a notif on this now.  With a little tweaking of the config, I seem to have gotten the SMTP server doing the job for us.  It goes through smtp.php, so it we have any problems it is at least in a seperate piece of code.

I don't know if anything except topic notifs are affected yet, but at least we have the comment notifs back.
Logged
sajuks
Site Builder

Offline Offline

Posts: 18


« Reply #11 on: December 18, 2005, 07:35:36 PM »

=D>
good to see this part working
Logged
COBOLdinosaur
ERT.com Admin

Offline Offline

Posts: 481



WWW
« Reply #12 on: December 18, 2005, 09:43:40 PM »

Yeah we got that fixed, but now we have to confirm that the slow response time on php page is because the host does not have a clue how to configure php.  Then I can feel justified in moving the site to a host where we don't get 20 second response time one day 3 second response time on the next day and then back to 20 seconds and the host claims there is nothing wrong.

It is so bad that a script to do server to server http bombs because it times out trying to get a socket connection;  AND THAT IS A SERVER PROBLEM, no matter what the hosts help desk says.
Logged
Pages: [1]
« previous next »
    Jump to: