Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Can I Send Email With JavaMail and No SMTP Server? (Like in ASP)  RSS feed

 
Robert Paris
Ranch Hand
Posts: 585
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to send email from a jsp page (or java app) but without having to log in to any server for sending the email. Is this possible? Does anyone have some sample code?
Doesn't JavaMail have the ability to send SMTP commands and do all conversions needed? Do I have to open a port and send it myself?
 
Balaji Loganathan
author and deputy
Bartender
Posts: 3150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No!. Even your ASP is using CDONTS object which uses IIS SMTP server installed in your system.
if you are hosting in IIS server you can use the default Windows smtp server for jsp as well.
if not try installing us own smtp server like James from apache.org
 
Nayanjyoti Talukdar
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JavaMail can only send messages to SMTP sever. It can't act as a SMTP server. U have to connect to SMTP server to send the mail/message to destination..
-----------
Nayan.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!