Solved

mail function error

Posted on 2003-10-28
3
168 Views
Last Modified: 2010-05-18
Is there any way to see what exactly the error is when I am calling my mail() function?  It have the mail function in a while loop that goes through a list of emails, the first one works, but a particualar email address is causing it to fail the second time through the loop.  

I think I can figure out the problem, if only I knew how to see what the error is.  Does mail return some sort of error code?  in PHP's docs, I didn't find anything that pointed me in the right direction.

Mike

0
Comment
Question by:msknr
  • 2
3 Comments
 
LVL 2

Expert Comment

by:errows
ID: 9637770
Try:
echo mail($vars);

errows
0
 

Author Comment

by:msknr
ID: 9639690
errows,

the mail function only returns a 0 or a 1 depending on if it was a success or failure.  I already know its failing.  I'm looking for a more verbose error.
0
 
LVL 2

Accepted Solution

by:
errows earned 50 total points
ID: 9641368
Try adding error_reporting(E_ALL); at the begining of your script...

mail gave me a warning on my side...

errows
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now