• 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: Chuck Hill <email@hidden>
  • Date: Wed, 28 Jun 2006 20:51:10 -0700


On Jun 28, 2006, at 8:41 PM, Art Isbell wrote:

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.

Art is correct. You are misinterpreting the meaning of the exception. It is not saying that it can't find your SMTP server, it is saying that it has no idea what SMTP _is_. My guess is that this means one of:


1. You installed mail.jar and activation.jar in the wrong place. They should be in one of /Library/Java/Extensions or Library/ WebObjects/Extensions.

2. You have conflicting versions of mail.jar and activation.jar in the directories above or elsewhere

3. One of these files is missing or corrupt

Google http://www.google.com/search?q=NoSuchProviderException+smtp +javamail

Google Knows All!

:-)

Chuck

--
Coming sometime... - an introduction to web applications using WebObjects and Xcode http://www.global-village.net/wointro


Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects




_______________________________________________ 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: Drew Thoeni <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>)
 >Re: JavaMail Props Not Being Set (From: Art Isbell <email@hidden>)

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