dannyoneill Posted June 12, 2008 Share Posted June 12, 2008 Hi, My mail scripts used to work fine until I upgraded to PHP 5.2.6. Since then if I send a mail with anything other than the email address in the To: or From: it fails i.e To: Joe Bloggs <[email protected]> I think its because of this emails from workpress fail as the code seems to include a name and email. I have the problem on my live dedicated server as well as a freshly built server. Wordpress just doesnt send and said mail() isnt allowed if I try a password reset and my php script fails with a syntax error (the syntax is 100% correct and worked before). But remove the name so the to reads To: [email protected] and its all fine. The details are below Windows Server 2003 PHP 5.2.6 Mail extensions included Windows SMTP server, localhost Link to comment https://forums.phpfreaks.com/topic/109871-mail-wont-send-with-name-and-email/ Share on other sites More sharing options...
jonsjava Posted June 12, 2008 Share Posted June 12, 2008 oddly enough, I've noticed the same thing. Luckily, I run my own server, and manage my own MTA, so I got to see what the issue is. It spits out an error code ("Invalid e-mail address") if you use something like Joe Smith<[email protected]> the mail function now wraps the from in this: <>, so when you add it the way we want to, your MTA receives this: From: <Joe Smith<[email protected]>> as you can see, that's not a real e-mail address. Hopefully they will release a patch in the next week or so for this. Link to comment https://forums.phpfreaks.com/topic/109871-mail-wont-send-with-name-and-email/#findComment-563840 Share on other sites More sharing options...
dannyoneill Posted June 12, 2008 Author Share Posted June 12, 2008 Phew, thought I done something wrong. Do you know of any work around. Im not fussed about my own feedback form but I am about my wordpress blog as the code for that is beyond my immediate understanding. Link to comment https://forums.phpfreaks.com/topic/109871-mail-wont-send-with-name-and-email/#findComment-563859 Share on other sites More sharing options...
jonsjava Posted June 12, 2008 Share Posted June 12, 2008 I have been coding and coding, trying to figure a work around, but to no luck. I have a script that is open-source, and I can't put out an update until they fix that bug. Link to comment https://forums.phpfreaks.com/topic/109871-mail-wont-send-with-name-and-email/#findComment-563875 Share on other sites More sharing options...
PFMaBiSmAd Posted June 12, 2008 Share Posted June 12, 2008 Several of the "new" bugs in php seem to be occurring because of a lack of knowledge by the person(s) making the change. Someone apparently decided to have the code "magically" add < > around email addresses even though that syntax is only used when there is an alias name in front of the email address. All of the "magical" things that php attempted to do in the past for the programmer, that he should have been doing himself, and only when he wanted them to be done, simply introduced problems that then had to be removed later. If you have not submitted a php bug report, find if there is an existing one and add your observations to it (the more people that report the same bug, the quicker it gets fixed) or create a new bug report. Link to comment https://forums.phpfreaks.com/topic/109871-mail-wont-send-with-name-and-email/#findComment-563938 Share on other sites More sharing options...
jonsjava Posted June 12, 2008 Share Posted June 12, 2008 Several of the "new" bugs in php seem to be occurring because of a lack of knowledge by the person(s) making the change. Someone apparently decided to have the code "magically" add < > around email addresses even though that syntax is only used when there is an alias name in front of the email address. All of the "magical" things that php attempted to do in the past for the programmer, that he should have been doing himself, and only when he wanted them to be done, simply introduced problems that then had to be removed later. If you have not submitted a php bug report, find if there is an existing one and add your observations to it (the more people that report the same bug, the quicker it gets fixed) or create a new bug report. great observations. For now, my solution was to step back a release in php. Link to comment https://forums.phpfreaks.com/topic/109871-mail-wont-send-with-name-and-email/#findComment-564024 Share on other sites More sharing options...
dannyoneill Posted June 12, 2008 Author Share Posted June 12, 2008 bug report submitted. Althought Ive just tried the script on my virtual server and its working but nothings changed. Trying to figure things out now. Link to comment https://forums.phpfreaks.com/topic/109871-mail-wont-send-with-name-and-email/#findComment-564028 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.