Solved

mail function error

Posted on 2003-10-28
3
167 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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

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.  …
Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
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 …

708 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

21 Experts available now in Live!

Get 1:1 Help Now