tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Johan Borchers <johan.borch...@solcon.nl>
Subject Re: (successful) Configuring gmail sending mail from Tomcat
Date Wed, 02 Jan 2008 12:08:33 GMT
I managed to send emails from a webapp in Tomcat using gmail.

The configuration is:

<Resource name="mail/MyMailServerName"
   auth="Container"
   type="javax.mail.Session"
   mail.transport.protocol="smtp"
   mail.smtp.host="smtp.gmail.com"
   mail.smtp.port="465"
   mail.smtp.auth="true"
   mail.smtp.user="myusername@gmail.com"
   password="mypassword"
   mail.smtp.starttls.enable="true"
   mail.smtp.socketFactory.class="javax.net.ssl.SSLSocketFactory"
/>

I didn't do anything with a keystore!

Johan

Dee├żan Chakravarthy wrote:
> Johan Borchers wrote:
>> Hello,
>>
>> I'm using Tomcat 6.0.14 on windows 2003 server with JDK 1.5.0_12.
>> I'm using now my 'normal' email account for sending email.
>>
>> <Resource name="mail/MyMailServerName"
>>   auth="Container"
>>   type="javax.mail.Session"
>>   mail.store.protocol="pop3"
>>   mail.pop3.host="pop.myprovider.xxx"
>>   mail.transport.protocol="smtp"
>>   mail.smtp.host="mail.myprovider.xxx"
>>   mail.smtp.port="25"
>>   mail.smtp.auth="true"
>>   mail.smtp.user="myusername"
>>   password="mypassword"
>> />
>>
>> I want to use a gmail account for sending email from Tomcat.
>>
>> Has anyone succesfully configured a gmail account for sending email 
>> from Tomcat.
>> I can't find the exact parameters to use.
>>
>> My first try was this:
>>
>> <Resource name="mail/MyMailServerName"
>>   auth="Container"
>>   type="javax.mail.Session"
>>   mail.store.protocol="pop3"
>>   mail.pop3.host="pop.gmail.com"
>>   mail.transport.protocol="smtps"
>>   mail.smtp.starttls.enable="true"
>>   mail.smtps.host="smtp.gmail.com"
>>   mail.smtps.port="465"
>>   mail.smtps.auth="true"
>>   mail.smtps.user="myusername@gmail.com"
>>   password="mypassword"
>> />
>>
>> I'm not sure if this is allright?
>> And I think I'll have to configure some keystore for a certificate.
>>
> 
> Looks fine.. Did you try it out ? Does it work ?
> 

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message