f



Problem with Mail() - PHP 5 vs PHP 4

In my PHP 5.0 at home, I'm using the following code to successfully
write to a database and also send out an email.  For some reason, when
I take this code to work, it still writes to the database but doesn't
send mail so we're (me and the I.T. guy) trying to find out whether
it's the difference between PHP 4 or something else with email
security.  

Does anyone here have experience with mail() in PHP 4 to know whether
PHP 4 had issues with mail() that were fixed with PHP 5 ???? We've
been chasing this from the mail server side at work when perhaps its
some nuance between versions of PHP.

Appreciate any help...

Chris


/* > $to = stripslashes($to); */
$to = stripslashes($to)."\r\n";
$subject = stripslashes($subject);
$text = stripslashes($text);
/* > mail('$to',$subject, $text); */
mail($to, $subject, $text, "From: admin@localhosthome.com");
0
2/27/2006 4:04:10 PM
comp.lang.php 32646 articles. 0 followers. Post Follow

4 Replies
1184 Views

Similar Articles

[PageSpeed] 41

cover wrote:
> $to = stripslashes($to)."\r\n";
>

Might or might not be the cause, but you should remove the trailing CRLF 
here.


JW 


0
jw137 (829)
2/27/2006 9:33:57 PM
On Mon, 27 Feb 2006 22:33:57 +0100, "Janwillem Borleffs"
<jw@jwscripts.com> wrote:

>cover wrote:
>> $to = stripslashes($to)."\r\n";
>>
>
>Might or might not be the cause, but you should remove the trailing CRLF 
>here.

Thanks for the reply.  I tried it after reading your post and no
change...  Thanks again,
0
2/28/2006 2:06:23 PM
cover wrote:
> In my PHP 5.0 at home, I'm using the following code to successfully
> write to a database and also send out an email.  For some reason, when
> I take this code to work, it still writes to the database but doesn't
> send mail so we're (me and the I.T. guy) trying to find out whether
> it's the difference between PHP 4 or something else with email
> security.
>
> Does anyone here have experience with mail() in PHP 4 to know whether
> PHP 4 had issues with mail() that were fixed with PHP 5 ???? We've
> been chasing this from the mail server side at work when perhaps its
> some nuance between versions of PHP.
>
Are you sure that this is happen because a diff. version of php?

what about the smtp settings in your php config?

-- 
regards Olaf
http://www.finalwebsites.com

0
3/1/2006 9:07:15 AM
"cover" <coverlandNOSPAM914@yahoo.com> wrote in message 
news:4d8602dnuuvlqgnkqnhfsf079un9es5jp2@4ax.com...
> In my PHP 5.0 at home, I'm using the following code to successfully
> write to a database and also send out an email.  For some reason, when
> I take this code to work, it still writes to the database but doesn't
> send mail so we're (me and the I.T. guy) trying to find out whether
> it's the difference between PHP 4 or something else with email
> security.
>
> Does anyone here have experience with mail() in PHP 4 to know whether
> PHP 4 had issues with mail() that were fixed with PHP 5 ???? We've
> been chasing this from the mail server side at work when perhaps its
> some nuance between versions of PHP.
>
> Appreciate any help...
>
> Chris
>
>
> /* > $to = stripslashes($to); */
> $to = stripslashes($to)."\r\n";
> $subject = stripslashes($subject);
> $text = stripslashes($text);
> /* > mail('$to',$subject, $text); */
> mail($to, $subject, $text, "From: admin@localhosthome.com");

perhaps it's your from address is invalid on your mailserver.
or it could be php.ini

; For Win32 only.
;sendmail_from = me@example.com

; For Unix only.  You may supply arguments as well (default: 
"sendmail -t -i").
;sendmail_path =

; Force the addition of the specified parameters to be passed as extra 
parameters
; to the sendmail binary. These parameters will always replace the value of
; the 5th parameter to mail(), even in safe mode.
;mail.force_extra_parameters =

is set wrong. 


0
3/1/2006 10:25:10 PM
Reply:

Web resources about - Problem with Mail() - PHP 5 vs PHP 4 - comp.lang.php

Is–ought problem - Wikipedia, the free encyclopedia
The is–ought problem in meta-ethics as articulated by Scottish philosopher and historian David Hume (1711–76) is that many writers make claims ...

Warnings about problem-plagued digitisation of WA hospitals 'ignored', technology experts say
Technology experts say a plan to digitise hospitals was destined to fall short, and their warnings were ignored.


Everything you need to know about Windows 10: product keys, secret tools, essential hacks, and problem ...
... want to look up your Windows 10 product key before you reinstall. But that's just the start; read on to learn tips, tweaks, hacks, and problem ...

A graphic depiction of the problem John Kasich has right now.
I'm watching the Sunday morning shows, and I thought John Kasich gave a great interview on "State of the Union with Jake Tapper." I jumped out ...

Trump: GOP Pledge a ‘Two Way Street,’ If It’s Not ‘They’re Going to Have a ‘Big Problem’
Trump: GOP Pledge a 'Two Way Street,' If It's Not 'They're Going to Have a 'Big Problem'

SpaceX’s new rocket fuel is causing problems with a mission that the company will try to launch for the ...
... Elon Musk has suffered a series of setbacks that have led it to postpone the same launch three different times. The root of the problem is ...

February 2016: Unofficial Problem Bank list declines to 228 Institutions
This is an unofficial list of Problem Banks compiled only from public sources. Here is the unofficial problem bank list for February 2016. Changes ...

California sea lion's rescue highlights serious problem
... to the beaches in Southern California, but one little sea lion pup went rogue, leaving authorities with an adorable reminder of a serious problem ...

Here's the problem with index ETFs
Index ETFs have grown in popularity but they aren't always a wise strategy, says Michael Farr. Here's why.

Resources last updated: 3/1/2016 9:16:20 PM