Mail problems in 2.0.5?

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
Locked
mmenzie
Registered User
Posts: 19
Joined: Mon Jul 07, 2003 11:59 pm
Contact:

Post by mmenzie » Tue Jul 08, 2003 12:14 am

Server Specs: Win XP Pro
Hosting Company: It's my own box so i host myself
PHP Version: 4.3.2
Apache Version: 2.0.46
Mysql Version: 4.0


well those are my specs...

my problem is new users can not register. i get the line 246 error. also i can not send out any mass mails i get the line 117 error. i have tried changing all the codes in the includes like the previous 7 pages of posts sugested bot i still can not register new users and i can not mass mail. this is not an update. this is a fresh install.

can some please post their include files that work so that i can just try theirs and see if they work and maybe my typing is faulty??

are there any real "official" fixes for this problem yet???

last question.... maybe i'm the idiot but i host my own server through my IP address through my ISP. i use a redirect service so i don't have to give out my IP if it changes. i do not run an email server on my server now (just a web server, apache, and a FTP server, serv-u) so is my problem that i'm trying to use the sendmail function when i should be using SMTP??? my understanding as it stands now is that i don't need an email server that PHPBB2 is doing the mail for me. am i wrong??

thanks
mike

***UPDATE*** i switched my settings to use SMTP and i put in my ISP's smtp server info.... well i still can't mass email. it says the email was sent but only I, the admin, gets it. none of my users get it and there are no errors and no bounced back messages. my new users can now sign up to be registered and they get the email link to finish the registration process. thats a plus at least

***UPDATE*** i was wrong in my last update. i have made the changes to my previous update.

mmenzie
Registered User
Posts: 19
Joined: Mon Jul 07, 2003 11:59 pm
Contact:

Post by mmenzie » Tue Jul 08, 2003 3:47 pm

Could SOMEONE please post their includes/emailer.php that they say works PLEASE!!!! i have tried changing the codes and i still have the same problems. i can not send a mass email. i get no errors whatsoever but only the admin gets the mail. NO ONE ELSE DOES!! please someone post their files instead of all this copy paste sugggestions. i am desperate!!!! i would like to make my board public but i can't cause of all the stuff that is not working.


PLEASE HELP ME!!!
mike

mmenzie
Registered User
Posts: 19
Joined: Mon Jul 07, 2003 11:59 pm
Contact:

Post by mmenzie » Tue Jul 08, 2003 4:13 pm

SoMeGoD wrote: please, someone can post the emailer.php here to ALL the users download?


I AGREE 100%

MrC
Registered User
Posts: 857
Joined: Mon Jun 30, 2003 4:11 pm
Location: The Netherlands
Name: Ivo
Contact:

Post by MrC » Tue Jul 08, 2003 6:18 pm

Acyd Burn wrote: All of you having problems with Mass Emailing, could you please apply the following 'patch' and tell us if it helped and if the other mail related functions are retaining to be operational too?

Open includes/emailer.php:

FIND

Code: Select all

		$this->extra_headers = (($this->replyto != '') ? "Reply-to: <$this->replyto>\n" : '') . (($this->from != '') ? "From: <$this->from>\n" : "From: <" . $board_config['board_email'] . ">\n") . "Return-Path: <" . $board_config['board_email'] . ">\nMessage-ID: <" . md5(uniqid(time())) . "@" . $board_config['server_name'] . ">\nMIME-Version: 1.0\nContent-type: text/plain; charset=" . $this->encoding . "\nContent-transfer-encoding: 8bit\nDate: " . gmdate('D, d M Y H:i:s Z', time()) . "\nX-Priority: 3\nX-MSMail-Priority: Normal\nX-Mailer: PHP\nX-MimeOLE: Produced By phpBB2\n" . trim($this->extra_headers) . (($cc != '') ? "Cc:$cc\n" : '')  . (($bcc != '') ? "Bcc:$bcc\n" : ''); 
REPLACE WITH:

Code: Select all

		$this->extra_headers = (($this->replyto != '') ? "Reply-to: <$this->replyto>\n" : '') . (($this->from != '') ? "From: <$this->from>\n" : "From: <" . $board_config['board_email'] . ">\n") . "Return-Path: <" . $board_config['board_email'] . ">\nMessage-ID: <" . md5(uniqid(time())) . "@" . $board_config['server_name'] . ">\nMIME-Version: 1.0\nContent-type: text/plain; charset=" . $this->encoding . "\nContent-transfer-encoding: 8bit\nDate: " . gmdate('D, d M Y H:i:s Z', time()) . "\nX-Priority: 3\nX-MSMail-Priority: Normal\nX-Mailer: PHP\nX-MimeOLE: Produced By phpBB2\n" . $this->extra_headers . (($cc != '') ? "Cc:$cc\n" : '')  . (($bcc != '') ? "Bcc:$bcc\n" : ''); 
To clarify this, the only change is the non-trimming of $this->extra_headers at the end of the line.



This helped me out.
But i had to enable smtp in the admin panel.
Server: localhost - no username and pass

I tested it and new registrations are getting an e-mail and so does the admin.

Did not test PM or mass e-mail yet, but for me notification of new members is more important.

mmenzie
Registered User
Posts: 19
Joined: Mon Jul 07, 2003 11:59 pm
Contact:

Post by mmenzie » Tue Jul 08, 2003 6:24 pm

MrC wrote:
Acyd Burn wrote:All of you having problems with Mass Emailing, could you please apply the following 'patch' and tell us if it helped and if the other mail related functions are retaining to be operational too?

Open includes/emailer.php:

FIND

Code: Select all

		$this->extra_headers = (($this->replyto != '') ? "Reply-to: <$this->replyto>\n" : '') . (($this->from != '') ? "From: <$this->from>\n" : "From: <" . $board_config['board_email'] . ">\n") . "Return-Path: <" . $board_config['board_email'] . ">\nMessage-ID: <" . md5(uniqid(time())) . "@" . $board_config['server_name'] . ">\nMIME-Version: 1.0\nContent-type: text/plain; charset=" . $this->encoding . "\nContent-transfer-encoding: 8bit\nDate: " . gmdate('D, d M Y H:i:s Z', time()) . "\nX-Priority: 3\nX-MSMail-Priority: Normal\nX-Mailer: PHP\nX-MimeOLE: Produced By phpBB2\n" . trim($this->extra_headers) . (($cc != '') ? "Cc:$cc\n" : '')  . (($bcc != '') ? "Bcc:$bcc\n" : ''); 
REPLACE WITH:

Code: Select all

		$this->extra_headers = (($this->replyto != '') ? "Reply-to: <$this->replyto>\n" : '') . (($this->from != '') ? "From: <$this->from>\n" : "From: <" . $board_config['board_email'] . ">\n") . "Return-Path: <" . $board_config['board_email'] . ">\nMessage-ID: <" . md5(uniqid(time())) . "@" . $board_config['server_name'] . ">\nMIME-Version: 1.0\nContent-type: text/plain; charset=" . $this->encoding . "\nContent-transfer-encoding: 8bit\nDate: " . gmdate('D, d M Y H:i:s Z', time()) . "\nX-Priority: 3\nX-MSMail-Priority: Normal\nX-Mailer: PHP\nX-MimeOLE: Produced By phpBB2\n" . $this->extra_headers . (($cc != '') ? "Cc:$cc\n" : '')  . (($bcc != '') ? "Bcc:$bcc\n" : ''); 
To clarify this, the only change is the non-trimming of $this->extra_headers at the end of the line.



This helped me out.
But i had to enable smtp in the admin panel.
Server: localhost - no username and pass

I tested it and new registrations are getting an e-mail and so does the admin.

Did not test PM or mass e-mail yet, but for me notification of new members is more important.



can you please post your emailer.php for download please

mike

MrC
Registered User
Posts: 857
Joined: Mon Jun 30, 2003 4:11 pm
Location: The Netherlands
Name: Ivo
Contact:

Post by MrC » Tue Jul 08, 2003 6:35 pm

Yup, i will

Download it here

Note: this worked for me, probably it will work for you, but i can't guarantee it.

Note2: change the smtp settings as i discribed before.

Good luck!

mmenzie
Registered User
Posts: 19
Joined: Mon Jul 07, 2003 11:59 pm
Contact:

Post by mmenzie » Tue Jul 08, 2003 7:12 pm

thanks MrC. well here are my results with your emailer.php you posted i can do mass email now BUY ONLY if i enable SMTP and i put in my ISP's SMTP server. if i use localhost with or without SMTP enabled i get an error:

Couldn't get mail server response codes

DEBUG MODE

Line : 117
File : D:\My webs\phpBB2\includes\smtp.php

i guess i have to leave my ISP's mail server in there if i want to make this board work :(

let me ask you something....cause maybe i don't understand..... i hot my own web page, i do not pay anyone to host it. i have a web server (apache) and a FTP server (serv-u) installed. i never installed a mail server. so is that why i can't use localhost as a server??? i was under the impression that PHPBB2 didn't need a seperate mail server. is it true then if i want to NOT use my ISP's mail server that i have to install my own???

mike

p.s. thanks again MrC. cause even if i have to use my ISP's server at least it now works. thanks.

MrC
Registered User
Posts: 857
Joined: Mon Jun 30, 2003 4:11 pm
Location: The Netherlands
Name: Ivo
Contact:

Post by MrC » Tue Jul 08, 2003 7:21 pm

It's a workaround.

Let the php pro's try to solve this problem.

Good to hear it works :D

mmenzie
Registered User
Posts: 19
Joined: Mon Jul 07, 2003 11:59 pm
Contact:

Post by mmenzie » Tue Jul 08, 2003 7:28 pm

mmenzie wrote: let me ask you something....cause maybe i don't understand..... i hot my own web page, i do not pay anyone to host it. i have a web server (apache) and a FTP server (serv-u) installed. i never installed a mail server. so is that why i can't use localhost as a server??? i was under the impression that PHPBB2 didn't need a seperate mail server. is it true then if i want to NOT use my ISP's mail server that i have to install my own???

mike



could someone answer this, it may end my confusion :?

mike

Juan de España
Registered User
Posts: 1
Joined: Tue Jul 08, 2003 9:03 pm

Post by Juan de España » Tue Jul 08, 2003 9:33 pm

Hi:

The problem of Acid Burn is easy to solve in case of Lycos server:

Open includes/emailer.php:

FIND IN LINE 246:

Code: Select all

		if (!$result)
		{
			message_die(GENERAL_ERROR, 'Failed sending email :: ' . (($this->use_smtp) ? 'SMTP' : 'PHP') . ' :: ' . $result, '', __LINE__, __FILE__);
		}

		return true;
REPLACE WITH:

Code: Select all

	//	if (!$result)
	//	{
	//		message_die(GENERAL_ERROR, 'Failed sending email :: ' . (($this->use_smtp) ? 'SMTP' : 'PHP') . ' :: ' . $result, '', __LINE__, __FILE__);
	//	}

		return true;
The silly error will continue taking place, but this eliminates the exit of errors at line 246. :wink:

It works in the case of free servers as Lycos !!! :D :D :D :D :D :D

This is ALL !!! :twisted: :D

User avatar
A_Jelly_Doughnut
Former Team Member
Posts: 34457
Joined: Sat Jan 18, 2003 1:26 am
Location: Where the Rivers Run
Contact:

Post by A_Jelly_Doughnut » Tue Jul 08, 2003 9:59 pm

I really hope that works. Somehow I missed that in this topic. 8O
A Donut's Blog
"Bach's Prelude (Cello Suite No. 1) is driving Indiana country roads in Autumn" - Ann Kish

charp
Registered User
Posts: 39
Joined: Mon Jun 23, 2003 5:46 pm
Location: California

Re: Just to put all the updates together in one place

Post by charp » Wed Jul 09, 2003 12:11 am

This is very interesting that the mass e-mail problem continues without a peep from the developers since the very beginning. I'm sure they're working on it, but it would be nice to hear, "hey we're still working on it", every once in awhile.

At any rate, I managed to fix all my phpBB e-mail problems with a couple of fixes of my own. I also applied a fix by DeamosSkygazer even though things seemed to be working already. Only one other poster has indicated that these fixes (3 in all) have solved their problems as well. So I'm curious if these changes worked for just the two two of us (MrStromyNights and myself).

Please try the following fixes, so well laid out by MrStormyNights, and let us all know if they work or not.
MrStormyNights wrote: The below are fixes recommended by Acyd Burn, charp and the debug catch by DeamosSkygazer
I tested mass email, pm's, admin Account activation, and everything worked fine using the below fixes.

Code: Select all


Open includes/emailer.php 

FIND 

		$this->extra_headers = (($this->replyto != '') ? "Reply-to: <$this->replyto>\n" : '') . (($this->from != '') ? "From: <$this->from>\n" : "From: <" . $board_config['board_email'] . ">\n") . "Return-Path: <" . $board_config['board_email'] . ">\nMessage-ID: <" . md5(uniqid(time())) . "@" . $board_config['server_name'] . ">\nMIME-Version: 1.0\nContent-type: text/plain; charset=" . $this->encoding . "\nContent-transfer-encoding: 8bit\nDate: " . gmdate('D, d M Y H:i:s Z', time()) . "\nX-Priority: 3\nX-MSMail-Priority: Normal\nX-Mailer: PHP\nX-MimeOLE: Produced By phpBB2\n" . trim($this->extra_headers) . (($cc != '') ? "Cc:$cc\n" : '')  . (($bcc != '') ? "Bcc:$bcc\n" : ''); 
 


REPLACE WITH: (note this is slightly different than Acyd Burn
 original Replacement, note the () around the second $this->extra_headers)

		$this->extra_headers = (($this->replyto != '') ? "Reply-to: <$this->replyto>\n" : '') . (($this->from != '') ? "From: <$this->from>\n" : "From: <" . $board_config['board_email'] . ">\n") . "Return-Path: <" . $board_config['board_email'] . ">\nMessage-ID: <" . md5(uniqid(time())) . "@" . $board_config['server_name'] . ">\nMIME-Version: 1.0\nContent-type: text/plain; charset=" . $this->encoding . "\nContent-transfer-encoding: 8bit\nDate: " . gmdate('D, d M Y H:i:s Z', time()) . "\nX-Priority: 3\nX-MSMail-Priority: Normal\nX-Mailer: PHP\nX-MimeOLE: Produced By phpBB2\n" . ($this->extra_headers) . (($cc != '') ? "Cc:$cc\n" : '')  . (($bcc != '') ? "Bcc:$bcc\n" : ''); 
 


Open includes/usercp_register.php 

Find

$emailer->use_template("admin_activate", $board_config['default_lang']); 
$emailer->email_address($lang['New_account_subject'] . ':;'); 
$emailer->set_subject($lang['New_account_subject']); 

Replace With:

$emailer->use_template("admin_activate", $board_config['default_lang']); 
$emailer->email_address($board_config['board_email']); 
$emailer->set_subject($lang['New_account_subject']); 
$emailer->from($board_config['board_email']);  


 
Open includes/constants.php

Find:

//define('DEBUG', 1); // Debugging on 
define('DEBUG', 1); // Debugging off 

Replace With: 

//define('DEBUG', 1); // Debugging on 
define('DEBUG', 0); // Debugging off 

User avatar
Lorand
Registered User
Posts: 31
Joined: Wed Jul 09, 2003 1:13 am
Location: Reno, Nevada
Contact:

I have tried all the fixes

Post by Lorand » Wed Jul 09, 2003 3:08 am

Unfortunately, they do not work.

I am working with a commercial server (I pay for the space & support) and it's set up using MySQL (version unsure) but php info is available if needed.

I instituted all 3 of the changes to the appropriate files but either continue getting the same "dual" error (new line #s error) previously mentioned or it flat does not work - hit register & get an error when pushing the "register" button.

Please help.

CrazyPhil
Registered User
Posts: 153
Joined: Sat Mar 16, 2002 4:03 am
Location: Ottawa, Canada

Post by CrazyPhil » Wed Jul 09, 2003 6:53 am

When this issue is completely fixed (confirmed) will the 2.0.5 files on sourceforge be updated Or will a post be made in the announcement section, like what was done for the 2 vulnerabilities in 2.0.5?

I'm currently running a small board so I recoded the emailer to send individual e-mails, it doesn't take that long since its small. If anyone would like this for themselves until they can get past this problem just ask.

User avatar
TuttoInfo
Registered User
Posts: 13
Joined: Fri Jul 04, 2003 9:38 pm
Contact:

Post by TuttoInfo » Wed Jul 09, 2003 10:07 am

Up!!!

Locked

Return to “2.0.x Support Forum”