Help coderanch get a
new server
by contributing to the fundraiser
  • 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
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

error sending email to hotmail account

 
Ranch Hand
Posts: 346
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I am having following problem in my program to send email to a hotmail account:

DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]
DEBUG SMTP: useEhlo true, useAuth true
DEBUG SMTP: trying to connect to host "mail.hotmail.com", port 25, isSSL false
javax.mail.MessagingException: Could not connect to SMTP host: mail.hotmail.com, port: 25;
nested exception is:
java.net.ConnectException: Connection timed out: connect

In program code I am using

String mailhost="mail.hotmail.com";

Can anyone suggest why I am not able to connect to hotmail smtp server.

thanks
 
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Maybe Hotmail don't want you to use their server to send emails.
 
Damanjit Kaur
Ranch Hand
Posts: 346
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ya I also felt that. Can you suggest some solution to my another latest problem.

Now I have installed free SMTP server and using that to send emails directly from my program. So I specify 'localhost' as mail server for sending emails thru this server.

and I get the following error though I don't get this error when I use smtp server of my office. so I know the recipient is right.

-----------------------------------------------------------------------
550 Invalid recipient: damanjitkaur@rediffmail.com
com.sun.mail.smtp.SMTPSendFailedException: 550 Invalid recipient: damanjitkaur@rediffmail.com
---------------------------------------------------------------------

I was reading in the documentation of this free SMTP server it states :

Be aware that that some ISPs close the SMTP port #25 forcing you to use only their SMTP server. You must be sure the port #25 is available for your ISP before using the program.



What does this mean?

Thanks
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
usually u can't send email to yahoo or hotmail (I mean those big and organized mail system) using ur own programme. This is to prevent spam and hack.

so try ur luck on a small/private/less security mail server.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic