TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 10-23-2008, 01:36 PM   #1 (permalink)
The Wanderer
 
Join Date: Oct 2008
Location: Florida
Posts: 5
Thanks: 1
chrisb is on a distinguished road
Default Checking Error on Mail()

Shouldn't the code below return as Failed because !!!! is not a valid email address?

I may be wrong, but I could've sworn it used to function that way. Now my server is coming back with Success even though that is obviously not going to send.

PHP Code:
if (mail('!!!','Test Message','This is my message.','FROM: Name<email@email.com>')) {
 echo 
"Success";
} else {
 echo 
"Failure";

chrisb is offline  
Reply With Quote
Old 10-23-2008, 09:41 PM   #2 (permalink)
The Acquainted
 
EyeDentify's Avatar
 
Join Date: Nov 2007
Location: Sweden
Posts: 106
Thanks: 13
EyeDentify is on a distinguished road
Default

from the mail() function page on php.net


Return Values

Returns TRUE if the mail was successfully accepted for delivery, FALSE otherwise.

It is important to note that just because the mail was accepted for delivery, it does NOT mean the mail will actually reach the intended destination.
__________________
Of course the whole point of a doomsday machine, would have been lost if you keep it a secret.
EyeDentify is offline  
Reply With Quote
Old 10-24-2008, 11:56 AM   #3 (permalink)
The Wanderer
 
Join Date: Oct 2008
Location: Florida
Posts: 5
Thanks: 1
chrisb is on a distinguished road
Default

Taken from Php.net. Therefor !!! would not be a RFC 2822 valid format, and should return with an error... no? Can somebody test my code above and see if you get success? I am trying to see if there is a problem with my server since it has recently upgraded.

Receiver, or receivers of the mail.

The formatting of this string must comply with » RFC 2822. Some examples are:

* user@example.com
* user@example.com, anotheruser@example.com
* User <user@example.com>
* User <user@example.com>, Another User <anotheruser@example.com>
chrisb is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 07:55 PM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design