Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

javaMail  RSS feed

 
aymane chetibi
Ranch Hand
Posts: 175
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello,

I am trying to write a simple email sender.
But when I try to connect to the SMTP Server it gives me this error:

javax.mail.MessagingException: Could not connect to SMTP host: mail.binghamton.edu, port: 25;
nested exception is:
java.net.SocketException: Software caused connection abort: connect
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1227)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:32
2)
at javax.mail.Service.connect(Service.java:236)
at javax.mail.Service.connect(Service.java:137)
at javax.mail.Service.connect(Service.java:86)
at javax.mail.Transport.send0(Transport.java:150)
at javax.mail.Transport.send(Transport.java:80)
at SimpleSender.send(SimpleSender.java:67)
at SimpleSender.main(SimpleSender.java:24)


Can anybody help with that ?

Thank you.
 
Carl Trusiak
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This looks like the connection was terminate by the server. There can be many reasons for it. Does the server require authentication for sending? Does the server have anti virus or anti spam software running? Try your application against a different SMTP server.
 
aymane chetibi
Ranch Hand
Posts: 175
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks I am forwarding your auestions to the server admin.
I'll get back to you soon.

thank you.
 
aymane chetibi
Ranch Hand
Posts: 175
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
he said yes There are scans running for incoming
mail to check for viruses & spam.


regards,
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
He should also be able to tell you why you can't connect. Be aware that port blocking software on your own PC will cause the same error.
 
aymane chetibi
Ranch Hand
Posts: 175
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What king of port blocking software ?
Firewalls ? Anti virus ??
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That sort of thing. Anything which could block SMTP or any traffic over port 25.
 
aymane chetibi
Ranch Hand
Posts: 175
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeeeeeeeeeeeees thank you.
That was MacAfee Anti Virus.


Thank you again!!
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!