How to create my own SMTP Server in Java/Grails to send Emails? [closed]

Offset added to the standard mail ports. Default is 10000 (so an activated SMTP service would start up on port 10025). greenmail., Starts a server for ...

How to create my own SMTP Server in Java/Grails to send Emails? [closed]

There are tons of SMTP services out there and most of them probably provide a free tier. I use (and love) Mandrill (http://blog.mandrill.com/new-simpler-pricing.html), but have heard good things about MailGun, SendGrid, and others. You can also browse a list of alternative solutions here (http://alternativeto.net/software/mandrill/).

To integrate an SMTP service with your application:

  • Add the mail plugin to your application (https://grails.org/plugin/mail)
  • Register an account with your desired SMTP service
  • Create a new API key for your application (within the SMTP service)
  • Add SMTP properties to your external configuration file (~/.grails/appName-config.properties) -- assuming that has been enabled

Here's an example configuration using Mandrill:

grails.mail.from = you@yourcompany.com
grails.mail.host = smtp.mandrillapp.com
grails.mail.port = 587
grails.mail.username = <mandrill-username> 
grails.mail.password = <mandrill-apikey>

Click Here to Visit

What's Your Reaction?

like
0
dislike
0
love
0
funny
0
angry
0
sad
0
wow
0