Mailgun email configuration to a jhipster project

Jhipster project requires email configuration so that application can send email during events like new user registration and forgot password.

I will be configuring mailgun email since its free plan support upto 400 mails per day.

Steps:

  1. Edit file src/main/resources/config/application-dev.yml and src/main/resources/config/application-prod.yml

Note: Use complete mail id in the above configuration. It will be like <username>.mailgun.org

2. Choose your preferred sender id for the emails sent by the application.
Edit file src/main/resources/config/application.yml

If you want all your mails be send by the id support@myapp, then configuration will be as follows

3. Modify baseurl value in the file src/main/resources/config/application-prod.yml

Say if you have hosted your application on heroku platform under free hosting plan, your application url will be something like
https://myapp.herokuapp.com

This steps is necessary because activation link sent after new user registration will be in format base-url/account/activate?key=
Similarly, after forget password event, the pasword reset link will also comprises of base-url. These links will be a valid url only if you have specified true baseurl.

--

--

System Administrator and Full stack web developer.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store