• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

About Port number in JavaMail

 
Ranch Hand
Posts: 37
Netbeans IDE Spring Fedora
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Help us solve this.

We have a web application hosted on tomcat-7, say
this is Server-A. This web application is sending an
email from GMail SMTP host to the users email address.

The below code are the Properties settings.

Our doubt is, why this code works fine only when
the port 465 is open on Server-A. We understand
from the JavaMail docs that 465 pertains to the
port on smtp.gmail.com. Why 465 to be open on
Server-A when it is not sending any emails ?

Thank you in advance.
 
Chanakya Gupta
Ranch Hand
Posts: 37
Netbeans IDE Spring Fedora
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
After some search, got this satisfactory
answer from Wikipedia. Thank you all
for your patience. Quoting the answer
from Wikipedia.

http://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol
"

...While electronic mail servers and other
mail transfer agents use SMTP to send
and receive mail messages, user-level
client mail applications
typically use SMTP
only for sending messages to a mail server
for relaying....

"

Since, our web application is user-level client
mail application
it uses SMTP and hence port
465 is to be opened.
 
Politics n. Poly "many" + ticks "blood sucking insects". Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic