Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Email  RSS feed

 
Saurabh kumar Pandey
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
I am trying to make a program on servlet to send email to anyone(any domain user like-yahoo,gmail) with localhost so what i need to do for this.I am using Apache Tomcat 6 and jdk 1.6.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66141
141
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You'd use the JavaMail API.

 
Saurabh kumar Pandey
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sir,
I am using JavaMail API in my program, and i also using an gmail smtp server to send mail so that the receiver is getting mail with my gmail account, but the thing is that i want to send mail with my domain(any domain that is not registered anywhere like abcb@xyz.com) from local host. And i am not getting reference to do that.

Sir, I am using apache server that is a web server but to send an email i need an smtp server.
And i am not getting any reference to do this.
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What does "i want to send mail with my domain" mean? Are you saying that you have no mail server for that domain? If you don't, you will probably run into anti-spam measures by other mail hosts unless you set MX and SPF DNS records properly.
 
Saurabh kumar Pandey
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf Dittmer wrote:What does "i want to send mail with my domain" mean? Are you saying that you have no mail server for that domain? If you don't, you will probably run into anti-spam measures by other mail hosts unless you set MX and SPF DNS records properly.


Yes sir, I do not have any mail server for that domain, so i need to know is there any mail server that i can use only for sending mail to any mailling portal like yahoo,gmail,etc. if it is possible then please guide me.
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use a send-only library like https://github.com/masukomi/aspirin, but like I said, you will need to set up an appropriate SPF DNS record to point to the IP address from where you send the mails, or your mails will likely get rejected as spam, especially by the bigger email services. And even if you do that, they may still get rejected, if you don't set up MX records like you would for incoming mail. And even if you do that, they may still not get delivered if you don't use DKIM, particularly by Yahoo. So once you have considered all that, it may make more sense to set up a proper email server for incoming and outgoing.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!