Line 234 emailer.php Problem

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
Luckenbach
Registered User
Posts: 18
Joined: Thu Dec 30, 2004 4:16 pm
Location: Texas
Contact:

Line 234 emailer.php Problem

Post by Luckenbach »

Topic for investigating the cause of the Line 234 error messages for emailer.php when various emails are sent.

This is a common error message, and I started this topic to bring people together to find the causes.

Define the problem:
When a user sends an email to another user he recieves this error message-

Failed sending email :: PHP ::
DEBUG MODE
Line : 234
File : /phpbbfolder/includes/emailer.php

Sometimes it only occurs when trying to mass email, sometimes only when a new user is registering, sometimes when private messaging, sometimes when a user emails another, and any combination of these. Some experience it in only one case, others in all. I have seen many solutions to this problem that have worked for many people, but for many others none of these solutions have worked. I hope to collect all the solutions together here. If you have a solution that worked for you, please post it here.

To test to see if the php mail function is working, create a php file with this code snippet in it, be sure to put your correct email address in it.

<?
$to = "put your email address here";
$subject = "test mail";
$body = "Email Works";
mail($to, $subject, $body);
?>

When your browser looks at this page, it should send you a test mail. Mine works, but emailer.php does not work.

If you use Yahoo hosting, you can contact wh-php@yahoo-inc.com for php help via email. I just received this response from them:
Dear Yahoo! Customer,

Thank you for contacting us.

Please note by default, the email link in the post is using 'mailto' tag
which will bring up visitor's own email client. Yahoo! Web Hosting
currently does not allow open relaying, so user won't be able to use
internal PHP mail function to send email to each others.
Please do not hesitate to reply if you need further assistance.

Regards,
Yahoo

Solutions:
1. Some people have changed the settings in Configuration to use SMTP (usually with localhost as the SMTP Server Address) and had the problem go away. Some had to contact their host for the correct server address.
2. There was a report that McAffee antivirus prevents sending email via the php mail function.
3. A few have solved the problem by uploading a fresh copy of email.php
4. Some have solved the problem by upgrading to 2.0.11, for others this seems to have caused the probem!
5. Yahoo doesn't allow relaying mail, so the user to user function just isn't going to work. You can disable this in the configuration. No SMTP on Yahoo. On the configuration page, in the bottom box, you must use an email address from your website. If you site is xyz.com, the address must be xxxxx@xyz.com This will allow the login/activation email to be sent, and notification emails. NOTE: Yahoo has a 250 email per day limit.

Non solutions:

1. Disable email as much as possible in Configuration:
Enable account activation, select None
Enable Visual Confirmation, select No
User email via board, select Disabled
The disadvantage of this is, email doesn't work and no restriction on who can register.

2. Some people just comment out Line 234 with // at the beginning of each line. Doesn't fix the problem but the error message is stopped. For some, the email function is working and they just don't want the error message.

3. Some have changed the error message in Line 234 to something else, like "Success, click on Forum Index or Log In to continue". Details on a way to do this are in this post, http://www.phpbb.com/phpBB/viewtopic.php?t=251848
Last edited by Luckenbach on Mon Jan 03, 2005 10:35 pm, edited 9 times in total.
The Techboy
Registered User
Posts: 207
Joined: Tue May 04, 2004 7:37 pm

Post by The Techboy »

The reason is generally a configuration error. Remember if you're setting it up yourself to enter the host details into the PHP config file.

If it still doesn't work, use an SMTP server who would allow you to send so many emails.
Eat recycled food. It's good for the environment and OK for you.
User avatar
bonelifer
Community Team Member
Community Team Member
Posts: 3503
Joined: Wed Oct 27, 2004 11:35 pm
Name: William
Contact:

Post by bonelifer »

I've had this happen even when SMTP is disabled. Why should this error happen when using Private Messaging?
Luckenbach
Registered User
Posts: 18
Joined: Thu Dec 30, 2004 4:16 pm
Location: Texas
Contact:

Post by Luckenbach »

I've had this happen even when SMTP is disabled.


You are correct! This error occurs with SMTP disabled.

With SMTP enabled, your error message is different, i.e.

Could not connect to smtp host : 65 : No route to host
DEBUG MODE
Line : 111
File : /phpbbmyadmin/includes/smtp.php

The two errors may be caused by the same things.
Why should this error happen when using Private Messaging?


When a Private Message is used, an email is sent to notify the member that he has a private message. When a member makes a post, there is a choice near the Submit button, "Notify me when a reply is posted". When this is checked an email is sent. Whether or not this is checked automatically is a preference the member can set in his profile, so some PM's will trigger the error and some may not.

This email triggers the error, not the private message itself. Disabling email in Configuration can stop the error for some, but then you don't have email. If "Notify me when a reply is posted" is not checked, the email is not sent and the error does not occur.

I read somewhere that if a tmp directory is created, an email error file will be created. Anyone try this?
Luckenbach
Registered User
Posts: 18
Joined: Thu Dec 30, 2004 4:16 pm
Location: Texas
Contact:

Solved the Yahoo problem

Post by Luckenbach »

Yahoo only lets you send email from the site itself, so all emails must end with you@yoursite.com in the from field. Relaying user to user mail is forbidden and does not work. Also Yahoo limits you to 250 emails per day, and does not do SMTP at all.

To avoid the dreaded Line 234 error on Yahoo:

Disable user email
Disable SMTP
Put a working email address from the domain the BB is on above disable SMTP in Configuration.

Now it works, but only for 250 emails. So I also
Disable private messaging(it sends notification emails) and
Disable view activation (it sends emails too)

I also need to disable "Notify me when a reply is posted", but there isn't an option for that in Configuration. Anybody have a mod or hack to disable it?
marius42
Registered User
Posts: 4
Joined: Tue Nov 25, 2003 7:47 pm
Location: Scots Bay, NS
Contact:

Error message when using the testmail suggested

Post by marius42 »

Hi...this problem is plaguing me as well. I have run the testmail and get this message...

PHP Warning: mail(): "sendmail_from" not set in php.ini or custom "From:" header missing in d:\home\marius42\amimckay.com\forum\testmail.php on line 5

Could the problem with the emailer for some of us be that the php.ini file is missing the "sendmail_from" ?

Where is this php.ini file located? I can't seem to find it anywhere.

Thanks for all your help,

Ian McKay
Luckenbach
Registered User
Posts: 18
Joined: Thu Dec 30, 2004 4:16 pm
Location: Texas
Contact:

Post by Luckenbach »

Sorry, Ian, but your error message is different than the one discussed in this thread. I'm so new at this phpBB and php stuff that I can't answer your questions, I still haven't figured out a way to disable the email on mine. Try the search function here, you may have to search for several different things to find your answer but it's probably here somewhere.
marius42
Registered User
Posts: 4
Joined: Tue Nov 25, 2003 7:47 pm
Location: Scots Bay, NS
Contact:

Post by marius42 »

I didn't explain myself well in that last message...I have the line 234 error issue and tried the test recommended in the first post of this thread to see if php mailers were enbaled on my server. The error message I posted was the result and I thought it might provide a new line of inquiry to find the source of the issue with emailer.php
justinsane
Registered User
Posts: 34
Joined: Sat Jan 01, 2005 9:29 pm

Post by justinsane »

marius42 wrote: I didn't explain myself well in that last message...I have the line 234 error issue and tried the test recommended in the first post of this thread to see if php mailers were enbaled on my server. The error message I posted was the result and I thought it might provide a new line of inquiry to find the source of the issue with emailer.php


I had this same issue(line 234 error) and was feeling quite silly when I realized the reason was I had the smtp listed as:

mydomain.com

it needed to be:

mail.mydomain.com

Fixed it for me anyway? Good luck 8)
Ali Abou-Zeid
Registered User
Posts: 15
Joined: Fri Jan 07, 2005 10:48 am

Post by Ali Abou-Zeid »

I have just finished setting up phpBB for my Virtual Airline's site. Email is working perfect without any problems. However, when sending emails to yahoo.com or hotmail.com (still dont' know which others) users get that error. I tried the email script and it worked fine for my domain's email but still yahoo & hotmail generated errors. Any clue other than SMTP?
Phoenicianparty
Registered User
Posts: 2
Joined: Wed May 09, 2007 10:10 pm

Re: Line 234 emailer.php Problem

Post by Phoenicianparty »

I keep getting this error message, does any one knows the solution for it


phpBB : Critical Error

Could not open _vti_cnf template config file

DEBUG MODE

Line : 390
File : functions.php
User avatar
Lumpy Burgertushie
Registered User
Posts: 67926
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Line 234 emailer.php Problem

Post by Lumpy Burgertushie »

Phoenicianparty wrote: I keep getting this error message, does any one knows the solution for it


phpBB : Critical Error

Could not open _vti_cnf template config file

DEBUG MODE

Line : 390
File : functions.php


first, why in the world did you drag up this topic from two years ago that is about email problems, to post this error?

your problem started because you are using frontpage to upload the files with.

you can't do that .

get a ftp program, go to your server, find and delete every single file/folder that has vti_cnf in it's name.

once you have done that,

then you have to reset your style back to subSilver.
you can do this with this script:
copy the following into a text file, save it as fix.php, upload it to your server and go to it in your browser.

yourdomain.com/yourphpbb/fix.php

this will take you back to subSilver;

Code: Select all

<?php

define('IN_PHPBB', true);

$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'config.'.$phpEx);
include($phpbb_root_path . 'includes/constants.'.$phpEx);

echo '<h1>phpBB Template Error Fix</h1><BR><BR>';

if( !defined("PHPBB_INSTALLED") )
{
	echo 'Error: phpBB is not Installed!';
	die;
}

if( ($dbms != 'mysql') && ($dbms != 'mysql4') )
{
	echo 'Error: This Fix only works with a MySQL Database';
	die;
}

$db = mysql_connect($dbhost,$dbuser,$dbpasswd);

if(!$db)
{
	echo 'Error: Could not connect to the MySQL Server';
	die;
}

$dbs = mysql_select_db($dbname);

if(!$dbs)
{
	echo 'Error: Could not select Database';
	die;
}

$query = "INSERT INTO ".THEMES_TABLE." (themes_id, template_name, style_name, head_stylesheet, body_background, body_bgcolor, body_text, body_link, body_vlink, body_alink, body_hlink, tr_color1, tr_color2, tr_color3, tr_class1, tr_class2, tr_class3, th_color1, th_color2, th_color3, th_class1, th_class2, th_class3, td_color1, td_color2, td_color3, td_class1, td_class2, td_class3, fontface1, fontface2, fontface3, fontsize1, fontsize2, fontsize3, fontcolor1, fontcolor2, fontcolor3, span_class1, span_class2, span_class3) VALUES (NULL, 'subSilver', 'subSilver', 'subSilver.css', '', 'E5E5E5', '000000', '006699', '5493B4', '', 'DD6900', 'EFEFEF', 'DEE3E7', 'D1D7DC', '', '', '', '98AAB1', '006699', 'FFFFFF', 'cellpic1.gif', 'cellpic3.gif', 'cellpic2.jpg', 'FAFAFA', 'FFFFFF', '', 'row1', 'row2', '', 'Verdana, Arial, Helvetica, sans-serif', 'Trebuchet MS', 'Courier, \'Courier New\', sans-serif', 10, 11, 12, '444444', '006600', 'FFA34F', '', '', '')";
$result = mysql_query($query,$db);

echo 'Inserting New Theme Record: ';

if(!$result)
{
	 echo '<font color="#FF0000">FAILED</font>';
	 die;
}
else
{
	$theme_id = mysql_insert_id($db);
	
	echo '<font color="#009933">SUCCESS</font>';
}	

echo '<br>';

$query = "INSERT INTO ".THEMES_NAME_TABLE." (themes_id, tr_color1_name, tr_color2_name, tr_color3_name, tr_class1_name, tr_class2_name, tr_class3_name, th_color1_name, th_color2_name, th_color3_name, th_class1_name, th_class2_name, th_class3_name, td_color1_name, td_color2_name, td_color3_name, td_class1_name, td_class2_name, td_class3_name, fontface1_name, fontface2_name, fontface3_name, fontsize1_name, fontsize2_name, fontsize3_name, fontcolor1_name, fontcolor2_name, fontcolor3_name, span_class1_name, span_class2_name, span_class3_name) VALUES ('".$theme_id."', 'The lightest row colour', 'The medium row color', 'The darkest row colour', '', '', '', 'Border round the whole page', 'Outer table border', 'Inner table border', 'Silver gradient picture', 'Blue gradient picture', 'Fade-out gradient on index', 'Background for quote boxes', 'All white areas', '', 'Background for topic posts', '2nd background for topic posts', '', 'Main fonts', 'Additional topic title font', 'Form fonts', 'Smallest font size', 'Medium font size', 'Normal font size (post body etc)', 'Quote & copyright text', 'Code text colour', 'Main table header text colour', '', '', '')";

$result = mysql_query($query,$db);

echo 'Inserting Theme Names For Record: ';

if(!$result)
{
	 echo '<font color="#FF0000">FAILED</font>';
}
else
{
	if(mysql_affected_rows($db)=='0')
	{
		echo '<font color="#999999">NAMES DATA ALREADY EXISTS</font>';
	}
	else
	{
		echo '<font color="#009933">SUCCESS</font>';
	}
}	

echo '<br>';

$query = "UPDATE ".CONFIG_TABLE." SET config_value = '1' WHERE config_name = 'override_user_style' LIMIT 1";
$result = mysql_query($query,$db);

echo 'Updating Override User Style: ';

if(!$result)
{
	 echo '<font color="#FF0000">FAILED</font>';
}
else
{
	if(mysql_affected_rows($db)=='0')
	{
		echo '<font color="#999999">NOT UPDATED</font>';
	}
	else
	{
		echo '<font color="#009933">SUCCESS</font>';
	}
}

echo '<BR>';

$query = "UPDATE ".CONFIG_TABLE." SET config_value = '".$theme_id."' WHERE config_name = 'default_style' LIMIT 1";
$result = mysql_query($query,$db);

echo 'Changing Default Theme ID: ';

if(!$result)
{
	 echo '<font color="#FF0000">FAILED</font>';
}
else
{
	if(mysql_affected_rows($db)=='0')
	{
		echo '<font color="#999999">NOT CHANGED</font>';
	}
	else
	{
		echo '<font color="#009933">SUCCESS</font>';
	}
}

echo '<BR><BR><b>Delete this File from your Server!</b><BR><BR>For any questions/problems about this script, please visit this <a href="http://www.phpbb.com/phpBB/viewtopic.php?t=29697">Page</a><BR><br>-phpBB Support Team';

die; 

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

Premium phpBB 3.3 Styles by PlanetStyles.net

If nobody is in the forest, does a tree really fall?
Phoenicianparty
Registered User
Posts: 2
Joined: Wed May 09, 2007 10:10 pm

Re: Line 234 emailer.php Problem

Post by Phoenicianparty »

phpBB : Critical Error

Could not open _vti_cnf template config file

DEBUG MODE

Line : 390
File : functions.php

Unable to enter the administration due to the error and I dont know how to fix the problem from file manager, if you can submit more keys to get into the files.
Put it this way I can't find the vti_cnf files
User avatar
Lumpy Burgertushie
Registered User
Posts: 67926
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Line 234 emailer.php Problem

Post by Lumpy Burgertushie »

Phoenicianparty wrote: phpBB : Critical Error

Could not open _vti_cnf template config file

DEBUG MODE

Line : 390
File : functions.php

Unable to enter the administration due to the error and I dont know how to fix the problem from file manager, if you can submit more keys to get into the files.
Put it this way I can't find the vti_cnf files

you need to get a real ftp program like filezilla ( google for it, it is free )

until then, just use the file manager, to access your phpbb folder, then look in every single folder and delete all folders with that in their name.
there will be one inside each folder of the board, so you will have to go through all of them.

folders inside of folders inside of folders.

you do not need to get inside the admin panel to do any of this.

if you run the script I showed you above, that will allow you to get back into the board.

then, go into your admin panel, go to styles management, delete the style with the vti name.

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

Premium phpBB 3.3 Styles by PlanetStyles.net

If nobody is in the forest, does a tree really fall?
Kpasa96
Registered User
Posts: 3
Joined: Mon Jan 07, 2008 1:15 am

Re: Line 234 emailer.php Problem

Post by Kpasa96 »

just wanted to say thanks - this thread helped me fix the Line 234 emailer.php problem and I've been searching different sites w/ Q's & A's for months, and tried everything, and this really helped!
:)
Locked

Return to “2.0.x Support Forum”