• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: WOMailDelivery sendEMail result?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: WOMailDelivery sendEMail result?


  • Subject: Re: WOMailDelivery sendEMail result?
  • From: Gavin Eadie <email@hidden>
  • Date: Wed, 14 Sep 2005 08:20:26 -0400

At 12:49 AM +0100 9/14/05, Miguel Arroz wrote:
I need to send emails from my application. I found that WOMailDelivery allows me to do that, but I have a question... how can I know if the email was sent when I call sendEMail? I mean, there may be a problem (like the SMTP being down), and in that case I would like to save the email on the database and try to send it some minutes later. sendEMail returns void, so I have no return code. Is there any other way to do this, that gives me some king of result related to the success of the mail sending operation?


If WOMailDelivery cannot send a message, the underlying mail transport software, JavaMail, will generate an exception, with a pretty explicit error string. For example:

   javax.mail.MessagingException:
      Could not connect to SMTP host: xxx, port: 25;

   javax.mail.MessagingException:
      Could not connect to SMTP host: xxx, port: 25, response: 554

Note that WOMailDelivery creates a new Java thread to actually send the mail, so the exception may show up sometime after the method has been called and returned ... Gavin
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
References: 
 >WOMailDelivery sendEMail result? (From: Miguel Arroz <email@hidden>)

  • Prev by Date: Re: WOMailDelivery sendEMail result?
  • Next by Date: Xcode is garbage!
  • Previous by thread: Re: WOMailDelivery sendEMail result?
  • Next by thread: Beginner Webobjects Web Service Question
  • Index(es):
    • Date
    • Thread