Drew,

Don't know why, but I have this same error when I only set these values on Properties file. The solution that I found was calling the following method on Application's class constructor and force SMTP host assignment:

setSMTPHost( System.getProperty( "WOSMTPHost" ) );

Hope this help.

Henrique

Drew Thoeni wrote:
I am trying to set the SMTP host for JavaMail. I have attempted set the properties in the Application, in the component, and in Resources->Properties. None of these approaches seems to get the props set (per exception at the end of this email).

In the Application() using this code:

public Application() {
super();
Properties props = System.getProperties();
//Specify the desired SMTP server
props.put( "WOSMTPHost", "smtp.comcast.net" );
props.put( "mail.smtp.host", "smtp.comcast.net" );
}


But when the app starts WO lists only "smtp" as the value of WOSMTPHost.


WOSMTPHost=smtp

Just prior to executing the Transport.send( message ); command I print the system properties and, as expected, these are the values.

WOSMTPHost=smtp.comcast.net
mail.smtp.host=smtp.comcast.net

But Transport.send( message );  fails with this exception.

SendFailedException: javax.mail.NoSuchProviderException: smtp

Regards,

Drew


------------------------------------------------------------------------

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/hprange%40ig.com.br

This email sent to [EMAIL PROTECTED]


------------------------------------------------------------------------

No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.9.4/375 - Release Date: 6/25/2006

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to