• 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: Kieran Kelleher <email@hidden>
  • Date: Wed, 14 Sep 2005 08:17:58 -0400

Miguel,

If you are comfortable with adding a couple of frameworks, you can use Project Wonder's ERJavaMail and withlogging set to WARN for the PW frameworks, you will see error messages immediately if sending fails. By default PW ERJavaMail does the sending in a separate thread, but you can call sendMail with a boolean telling it to process it in the same thread too and catch any errors yourself.

Additionally PW includes an ERMailer app which uses an ercore EOModel/database which provides a very nice solution for your app (or multiple different apps) which involves your app simply creating an ERMailMessage entity for each message and saving it to the database. Then the ERMailer app sends pending emails from the database. ERMailer app will save exceptions to the database if any single message fails for any reason. I use both solutions and they work well. For ERMailer though you do need to download the latest source from CVS.

The really nice thing about ERJavaMail and ERMailer is that even if you never use them, you can still download them, look at the source code (opening the projects in XCode) and see working examples of how to work with the Sun javamail API (which is what WOMailDelivery does in the latest versions of WO anyway).

If you want to explore these options, I have some notes here:
http://homepage.mac.com/kelleherk/iblog/C183784902/E1851653685/ index.html
http://homepage.mac.com/kelleherk/iblog/C183784902/E2093239404/ index.html


HTH,

-Kieran
________________________________________________________________
Blog: http://webobjects.webhop.org/


On Sep 13, 2005, at 7:49 PM, Miguel Arroz wrote:

Hi!

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?

  Yours

Miguel Arroz

      "GUERRA E' PAZ
       LIBERDADE E' ESCRAVIDAO
       IGNORANCIA E' FORCA"       -- 1984

Miguel Arroz
http://www.ipragma.com



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden


This email sent to email@hidden


_______________________________________________ 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: Apple, any slight update or estimation on WO 5.3.1, Please ??
  • Next by Date: Re: WOMailDelivery sendEMail result?
  • Previous by thread: WOMailDelivery sendEMail result?
  • Next by thread: Re: WOMailDelivery sendEMail result?
  • Index(es):
    • Date
    • Thread