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/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to