Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-03-2008, 10:13 AM
Junior Member
 
Join Date: Mar 2008
Posts: 2
Default Doubt about Zend_Mail

Hi, i will try to explain the best i can, but my english is not that good.

i have to check when i send a mail (i'm using Zend/Mail and Smtp Authentication) if the mail was correctly sent or not. If it wasn't sent, i have to send another mail to another email address to register that this first mail wasn't sent.

The problem is that i don't find in Zend Mail a way to check if this first mail has been sent or not. Does someone knows how to check it?

Thanks!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 03-03-2008, 01:11 PM
Junior Member
 
Join Date: Jan 2008
Posts: 16
Default

Hi,

It throws a Zend_Mail_Exception

You might need to surround the send() with a try catch block.
e.g.

Code:
try {
  $mail->send();
} catch (Exception $e) {
  echo "Failed to Send Email.";
}

Last edited by lordspace : 03-03-2008 at 05:44 PM. Reason: Fix indentation
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 03-03-2008, 01:28 PM
Junior Member
 
Join Date: Mar 2008
Posts: 2
Default

Thank You very much!

i must be stupid, i was searching for all kinds of methods in Zend Framework and completely forgot to do it catching an exception!

thanks.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
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 03:30 PM.