Solved

mail function error

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How do I fix this UPDATE error? 7 32
Currency in SQL? 2 31
Row insertion failed. Array 5 48
form validation - make sure at least 1 checkbox is selected 18 30
Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
This article discusses how to create an extensible mechanism for linked drop downs.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

828 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