Re: JavaMail Props Not Being Set
Re: JavaMail Props Not Being Set
- Subject: Re: JavaMail Props Not Being Set
- From: Henrique Prange <email@hidden>
- Date: Mon, 26 Jun 2006 19:46:29 -0300
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@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
------------------------------------------------------------------------
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@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden