• 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: JavaMail Props Not Being Set
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: JavaMail Props Not Being Set


  • Subject: Re: JavaMail Props Not Being Set
  • From: Art Isbell <email@hidden>
  • Date: Wed, 28 Jun 2006 17:41:01 -1000

On Jun 28, 2006, at 4:55 PM, Drew Thoeni wrote:

So, I've tried the four suggestions:

Paul's "put in properties file": no effect.

This works for me. I added the following properties to my Properties file:


# JavaMail
mail.store.protocol=smtp
mail.transport.protocol=smtp
mail.smtp.host=xxxx.xxxx.com

# Email address to which bounced messages should be sent
mail.smtp.from=email@hidden

JavaMail is complex. I understand only the bare minimum that allowed me to build a replacement for WOMailDelivery which can be unreliable. To make WOMailDelivery easily replaceable, I created a JavaMailDelivery class that uses JavaMail underneath and reimplemented WOMailDelivery.composePlainTextEmail() as JavaMailDelivery.composePlainTextEmail(). I basically copied the implementation of send() at <http://www.javaworld.com/javaworld/ jw-10-2001/jw-1026-javamail.html> adding exception handling where needed and relying on properties in the Properties file rather than hard-coding their values. It works fine.

SendFailedException: javax.mail.NoSuchProviderException: smtp

According to the JavaMail javadoc, NoSuchProviderException is thrown when the JavaMail "Session attempts to instantiate a Provider that doesn't exist." A Provider is the description of a protocol implementation. In your case, the "smtp" protocol implementation doesn't seem to exist. Maybe you need to set the mail.store.protocol and mail.transport.protocol properties in your Properties file or maybe your JavaMail implementation is broken. I have no idea.


Rather than fight this any more, take a look at the sample code. It contains less than 15 statements.

Aloha,
Art

_______________________________________________
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


  • Follow-Ups:
    • Re: JavaMail Props Not Being Set
      • From: Mike Schrag <email@hidden>
    • Re: JavaMail Props Not Being Set
      • From: Chuck Hill <email@hidden>
References: 
 >JavaMail Props Not Being Set (From: Drew Thoeni <email@hidden>)
 >Re: JavaMail Props Not Being Set (From: Paul Suh <email@hidden>)
 >Re: JavaMail Props Not Being Set (From: Mike Schrag <email@hidden>)
 >Re: JavaMail Props Not Being Set (From: Drew Thoeni <email@hidden>)

  • Prev by Date: Eclipse, WO and Windows
  • Next by Date: Re: Eclipse, WO and Windows
  • Previous by thread: Re: JavaMail Props Not Being Set
  • Next by thread: Re: JavaMail Props Not Being Set
  • Index(es):
    • Date
    • Thread