Solved

mail function error

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

This article will explain how to display the first page of your Microsoft Word documents (e.g. .doc, .docx, etc...) as images in a web page programatically. I have scoured the web on a way to do this unsuccessfully. The goal is to produce something …
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.  …
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

813 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