Forum Moderators: coopster
I've spent most of yesterday hunting through the support forums for help but nothing that's written at a basic enough level.
Currently I'm configured NOT to use SMTP for email. I've tried using SMTP and it doesn't work.
I have "Use SMTP server for email" turned OFF and have the "SMTP Username" and "SMTP Password" fields blank.
I checked and my phpBB forum is hosted on a Linux server.
But when someone registers on the BB, or when I use the mass email function, I get the following error message (interestingly though, the email still goes though)...
------------------------------------------------------------------
Failed sending email :: PHP ::
DEBUG MODE
Line : 234
File : /var/www/ocoloco/awj42650/htdocs/phpBB2/includes/emailer.php
------------------------------------------------------------------
I don't understand this, and when I look at line 234 of the code I don't know what to do anyway.
Line 234 looks like this:
------------------------------------------------------------------
message_die(GENERAL_ERROR, 'Failed sending email :: ' . (($this->use_smtp)? 'SMTP' : 'PHP') . ' :: ' . $result, '', __LINE__, __FILE__);
------------------------------------------------------------------
Can anyone please help? The forum is otherwise working brilliantly, it's a shame this last thing seems imposisble to fix.
Again, I'm incredibly new to all of this so extremely simple instructions would be so massively appreciated, thanks! :)
// Send message ... removed $this->encode() from subject for time being
if ( $this->use_smtp )
{
if (!defined('SMTP_INCLUDED') )
{
include($phpbb_root_path . 'includes/smtp.' . $phpEx);
}$result = smtpmail($to, $this->subject, $this->msg, $this->extra_headers);
}
else
{
$empty_to_header = ($to == '')? TRUE : FALSE;
$to = ($to == '')? (($board_config['sendmail_fix'])? ' ' : 'Undisclosed-recipients:;') : $to;
$result = @mail($to, $this->subject, preg_replace("#(?<!\r)\n#s", "\n", $this->msg), $this->extra_headers);
if (!$result &&!$board_config['sendmail_fix'] && $empty_to_header)
{
$to = ' ';
$sql = "UPDATE " . CONFIG_TABLE . "
SET config_value = '1'
WHERE config_name = 'sendmail_fix'";
if (!$db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Unable to update config table', '', __LINE__, __FILE__, $sql);
}
$board_config['sendmail_fix'] = 1;
$result = @mail($to, $this->subject, preg_replace("#(?<!\r)\n#s", "\n", $this->msg), $this->extra_headers);
}
}
// Did it work?
if (!$result)
{
message_die(GENERAL_ERROR, 'Failed sending email :: ' . (($this->use_smtp)? 'SMTP' : 'PHP') . ' :: ' . $result, '', __LINE__, __FILE__);
[edited by: jatar_k at 1:28 am (utc) on May 12, 2004]
[edit reason] edited code [/edit]
I received some advice from one of the other mods who runs phpbb and she said to check the dead.letter file for clues and also
[phpbb.com...]
and
google search [google.com]