Gossamer Forum
Home : General : Perl Programming :

Favorite Mail Method with PHP...

Quote Reply
Favorite Mail Method with PHP...
For you people who program PHP. What is your favorite way to send mail? I was trying the mail()function but I didn't seem to have much luck with it (no error, but no mail)....anyone got a personal favorite?

Thanks

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [AndyNewby] Favorite Mail Method with PHP... In reply to
What were you trying with mail()?

I doubt it is a buggy function Wink

Last edited by:

RedRum: Feb 2, 2002, 10:12 AM
Quote Reply
Re: [RedRum] Favorite Mail Method with PHP... In reply to
In Reply To:
What were you trying with mail()?

I doubt it is a buggy function Wink


Why? I wouldn't be at all surprised if a bug was discovered in there. We [at my work] find bugs in PHP all the time. Quite annoying in fact.

That's where PHP and Perl differ. PHP is nowhere near mature yet, nor does it have the caliber of people programming it (the language itself...working on the internals) that Perl does. I'm not saying that Perl doesn't have its own bugs, but it's far more mature... Version 5 has been out, what, 10 years now (or close to it)? PHP has had 4 major versions in 5 years (I think). They keep adding and changing existing functions so some of our software breaks from php version to version (we have one MAJOR piece of functionality at our site that will need to be rewritten if we want to upgrade the servers from 4.0.6 to 4.1.1 because of the way certain functions were changed in 4.1.x)

Some day it will get there, but it's not there yet. Not a bad little language (though there are things about it annoy me), but I still prefer Perl over it. Hopefully Perl doesn't have the same sort of issues when 6.0 is released.

--mark

Last edited by:

Mark Badolato: Feb 2, 2002, 12:47 PM
Quote Reply
Re: [Mark Badolato] Favorite Mail Method with PHP... In reply to
>>Why? I wouldn't be at all surprised if a bug was discovered in there. We [at my work] find bugs in PHP all the time. Quite annoying in fact.
<<

Agreed but I doubt that a function would be unusable due to a bug. It would have been spotted by the millions of php users.
Quote Reply
Re: [Mark Badolato] Favorite Mail Method with PHP... In reply to
In Reply To:
They keep adding and changing existing functions so some of our software breaks from php version to version (we have one MAJOR piece of functionality at our site that will need to be rewritten if we want to upgrade the servers from 4.0.6 to 4.1.1 because of the way certain functions were changed in 4.1.x)
They don't usually make changes which will break existing 4.x code. The LinksSQL PHP Front End code works with all 4.0.2+ versions.

In Reply To:
Hopefully Perl doesn't have the same sort of issues when 6.0 is released.
From what I've heard they're changing quite a few things (concat operator has changed from . to _, stuff like that), but I believe it will still be backwards compatible.

Adrian
Quote Reply
Re: [brewt] Favorite Mail Method with PHP... In reply to
In Reply To:
They don't usually make changes which will break existing 4.x code. The LinksSQL PHP Front End code works with all 4.0.2+ versions.


er, my reply borked. hmm. anways

Yeah you would think, but sure enough or software totally broke under 4.1.x. I dont know the specifics as I don't maintain that piece of software, but I *think* it was changes to socket connections or handling. Not sure though. all I know is, reverting the server to 4.0.6 fixed it :)

Perl 6 will be intertesting. Lots of changes but they are supposed to be backwards compatible. we'll see. :)

Last edited by:

Mark Badolato: Feb 2, 2002, 2:06 PM
Quote Reply
Re: [Mark Badolato] Favorite Mail Method with PHP... In reply to
Andy,

Can you post the code you were using to try to get the mail() function to work. The mail function doesn't have any major bugs in it, or minor bugs as far as I know. It is a highly used function. Bugs with it with have been reported and fixed a long time ago.
Cheers,
Michael Bray
Quote Reply
Re: [Michael_Bray] Favorite Mail Method with PHP... In reply to
The mail() docs seem fairly clear to me:

http://www.php.net/...en/function.mail.php
Quote Reply
Re: [RedRum] Favorite Mail Method with PHP... In reply to
Yup, the documentation is clear BUT there is definatly a bug! (unless i'm freaking out that is...lol).

For some reason, when sending to non-redirected email account (i.e. my hotmail.com or tiscali.co.uk account) it gets sent fine. As soon as I send it through an account like ace-host.com (which redirects to my ticali.co.uk account) it just doesn't get through! Anyone else experienced this before?

Well, maybe I should report it to PHP, or i suppose it could be fixed in version 6 (?) Wink

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [AndyNewby] Favorite Mail Method with PHP... In reply to
Or you could post the code Tongue

The problem might be with the server redirecting the mail? Post the code anyway so we can atleast see if it has a bug in it. I seriously doubt the mail() function has a bug in it. The problem is most likely with your code, or your mail server.

Could you also post the version of PHP you are using, and the version of Sendmail (Assuming that is what you are using...). A phpinfo() page would be useful.
Cheers,
Michael Bray
Quote Reply
Re: [Michael_Bray] Favorite Mail Method with PHP... In reply to
You could get it here - http://www.ace-installer.com/links_recommend.zip

I'm not definate what version I'm using of PHP, but I think its v4.06.

Thanks

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [AndyNewby] Favorite Mail Method with PHP... In reply to
Why not just use the mail function directly as opposed to wrapping it into another function?
Cheers,
Michael Bray