Page 2 of 2

Posted: Fri Oct 21, 2005 12:35 am
by MarkTheDaemon
Please see the other topic on this with answers @

http://www.phpbb.com/phpBB/viewtopic.php?t=334001

Mark

Re: This is what I did.

Posted: Thu Oct 27, 2005 2:53 pm
by imo
I still dont get this... by looking at what's going in the extra headers string, I can send a mail using PHP and the following code:

<?php
$extra_headers = "Reply-to: a@b.c\n";
$extra_headers = $extra_headers . "From: a@b.c\n";
$extra_headers = $extra_headers . "Return-Path: a@b.c\n";
$extra_headers = $extra_headers . "Message-ID: <" . md5(uniqid(time())) . "@b.c\n";
$extra_headers = $extra_headers . "MIME-Version: 1.0\n";
$extra_headers = $extra_headers . "Content-type: text/plain; charset=iso-8859-1";
$extra_headers = $extra_headers . "Content-transfer-encoding: 8bit\n";
$extra_headers = $extra_headers . "Date: " . date('r', time()) . "\n";
$extra_headers = $extra_headers . "X-Priority: 3\nX-MSMail-Priority: Normal\nX-Mailer: PHP\nX-MimeOLE: Produced By phpBB2\n" ;

echo mail("ian@imosystems.co.uk", "Test", "This is a mail test ", $extra_headers);
?>

yet I get the dreaded Line 237 error message in emailer.php.

Re: This is what I did.

Posted: Fri Apr 07, 2006 9:38 am
by beery
ieruiz wrote: I had the same trouble. This is how I got by it.

Make a copy first of the emailer.php file located in your INCLUDES subdirectory. Keep it as a backup.

Edit your emailer.php file.

Change all lines that read as follows:

$result = @mail($to, $this->subject, preg_replace("#(?<!\r)\n#s", "\n", $this->msg), $this->extra_headers);

Take out the ",$this->extra_headers" part so that it now looks like so:

$result = @mail($to, $this->subject, preg_replace("#(?<!\r)\n#s", "\n", $this->msg));

Replace the emailer.php file in your INCLUDES directory with your changed copy.

Have a beer.

Cheers,

Isaac


I had changed it , but doesn't work for me. :cry:

Re: This is what I did.

Posted: Wed Aug 13, 2008 11:42 pm
by martigan39759
ieruiz wrote:I had the same trouble. This is how I got by it.

Make a copy first of the emailer.php file located in your INCLUDES subdirectory. Keep it as a backup.

Edit your emailer.php file.

Change all lines that read as follows:

$result = @mail($to, $this->subject, preg_replace("#(?<!\r)\n#s", "\n", $this->msg), $this->extra_headers);

Take out the ",$this->extra_headers" part so that it now looks like so:

$result = @mail($to, $this->subject, preg_replace("#(?<!\r)\n#s", "\n", $this->msg));

Replace the emailer.php file in your INCLUDES directory with your changed copy.

Have a beer.

Cheers,

Isaac
WOW!! Thank you so so much Isaac!! I have been asking how to fix this for months and I kept getting the same answers from everyone! You are the first person to actually solve this and so easy too!! You are my hero! I couldn't thank you enough! Why do people have to make everything so complicated?? I have seen pages and pages of people going back and forth talking about the most mind boggingly inane boring computer gobbildy gook about ports and smtp and mysql php asp blah blah blah as I have ever seen in my life, ugh!!! And you just solved it with two lines of deleting code!! wow!! THANKS!!!!

Re: Failed Sending Email ::PHP::

Posted: Thu Aug 14, 2008 12:41 am
by ric323
I'm glad that fixed your problem too martigan39759, but that does NOT mean it is a universal solution.
Web hosts keep trying new ways to combat SPAM, and nearly always trip up another piece of software when they do. You're fortunate that your host did the same as his.