Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java and SMTP

 
Matt Millar
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello I am trying to learn how SMTP works and I went with java for my test. I have been following some examples and putting together a Frankenstein kinda code but it works to a degree. Everything works fine up till you try to send a email I think. I gets down to the mail FROM part then gives me this error




I am stumped on it. It look like the one online that I used and from my book but it does not work. Am i missing something here? Thanks for any help with this.
Here my code

 
Paul Clapham
Sheriff
Posts: 21107
32
Eclipse IDE Firefox Browser MySQL Database
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looks like you're trying to connect to a mail server which requires a secure connection. That's going to be a complication which you don't need while you're learning the basics of SMTP. So I suggest you test with a different server.
 
Matt Millar
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you I didnt even think of that. Could you suggest one that would work?
 
Paul Clapham
Sheriff
Posts: 21107
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would suggest running your own. (That also allows you to get experience with the server side of SMTP.) Apache James is an open-source SMTP server written in Java, you could use that.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic