Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2008
    Posts
    1
    Rep Power
    0

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

    Hi Champs,

    I got Could not connect to SMTP host: smtp.gmail.com, port: 25 exception when i send a mail by java program on Linux server.
    when i execute the same program it works fine.

    Any champ have any idea about the same so plz reply me ..


    Thanks,
    Nikunj

  2. #2
    StormyWaters is offline Senior Member
    Join Date
    Feb 2009
    Posts
    307
    Rep Power
    6

    Default

    I thought gmail used port 587

  3. #3
    yoram2011 is offline Member
    Join Date
    Aug 2011
    Posts
    3
    Rep Power
    0

    Default

    StormyWaters is right if you want to send an email from your GMAIL account.

    ... Unless you want to send an email to a gmail account, in this case the MX lookup of Server with port 25 is

    5 gmail-smtp-in.l.google.com 74.125.65.27 60 min SMTP Test Blacklist Check
    10 alt1.gmail-smtp-in.l.google.com 74.125.113.27 60 min SMTP Test Blacklist Check
    20 alt2.gmail-smtp-in.l.google.com 209.85.143.27 60 min SMTP Test Blacklist Check
    30 alt3.gmail-smtp-in.l.google.com 209.85.229.27 60 min SMTP Test Blacklist Check
    40 alt4.gmail-smtp-in.l.google.com 74.125.79.27 60 min SMTP Test Blacklist Check

    If you have discrepancy between 2 servers then I suggest looking at your firewall...

Similar Threads

  1. sending a simple email message via SMTP
    By chahhchahh in forum Networking
    Replies: 5
    Last Post: 03-08-2009, 07:58 PM
  2. Java Mail "SMTP host" Exception
    By Poyntz in forum Networking
    Replies: 15
    Last Post: 01-06-2009, 08:52 PM
  3. sending email without SMTP?
    By java_srinivasan in forum Advanced Java
    Replies: 1
    Last Post: 07-23-2008, 04:45 PM
  4. A Client to Send SMTP Mail
    By Java Tip in forum java.net
    Replies: 0
    Last Post: 04-07-2008, 09:06 PM
  5. Readind email from smtp server
    By pzkhan in forum Advanced Java
    Replies: 0
    Last Post: 02-10-2008, 08:57 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •