• Post Reply Bookmark Topic Watch Topic
  • New Topic

Email

 
rama krishnan
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
while sending email from my Java project, i'm getting this below exception

javax.mail.MessagingException: Could not connect to SMTP host: smtp.gmail.com, port: 587

can any one have the solution
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That port on that host is open. Does your code provide authentication?
 
Rob Spoor
Sheriff
Posts: 20829
68
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ulf Dittmer:
That port on that host is open.

Well it is for us, but that doesn't mean it is for Rama.

Rama, can you open a command window and execute the following command:

Should you see a response like "220 mx.google.com" that means that the availability is not a problem. Type "quit" and enter to exit.
 
Rene Larsen
Ranch Hand
Posts: 1179
Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maybe you can use the informations from this thread: Unknown SMTP host for gmail
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!