Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6361509
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T23:47:13+00:00 2026-05-24T23:47:13+00:00

Does anybody know the smtp settings that need to be applied within the application.conf

  • 0

Does anybody know the smtp settings that need to be applied within the application.conf file of a Play Framework project for sending emails on localhost?

During my unit testing I am getting the error:

A play.exceptions.MailException has been caught, Cannot send email

The developers at Play have made sending emails so easy that the only way I could be messing up is with my settings in the config file.

I have tried just using:

mail.smtp=mock

And I tried commenting out the line above and using:

mail.smtp.host=127.0.0.1

Neither of these two approaches work. I understand that this is probably a very noob question, but I have never really dealt with setting up emails before – so I am grateful for any help that can be contributed.

If it is the case that I am unable to send email as Play would not work as an SMTP server, is there any way that I can use mail.smtp=mock to ‘mock send’ an email and allow my tests to pass?

Useful Link

This is a link to the Play documentation for sending emails

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T23:47:14+00:00Added an answer on May 24, 2026 at 11:47 pm

    To better diagnose the problem, you can use the following setting (in application.conf) to give more details of the email sending process.

    mail.debug=true
    

    However, for testing purposes, I have found using GMail the easiest method for sending emails.
    The configuration (again in application.conf) is…

    mail.smtp.host=smtp.gmail.com
    mail.smtp.user=yourGmailLogin
    mail.smtp.pass=yourGmailPassword
    mail.smtp.channel=ssl
    

    For full details of all the configurations, the Play Framework page has lots of information on how to do this.

    http://www.playframework.org/documentation/1.2.2/emails

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anybody know how to properly read from a file an input that looks
does anybody know a way to show that default alert like Your application wants
Does anybody know how to get thumbnail (still image) from 3gb video file? First
Does anybody know of a diff-like tool that can show me the changes between
Does anybody know of a bookmarklet or firefox addon that let's you extract part
Does anybody know how to create a text field using PyGTK that only accepts
Does anybody know a Java implementation of the DRMAA-API that is known to work
Does anybody know what dictionary UITextChecker pulls from? I use it to verify that
Does anybody know the values that are given in the table_privileges? I already found
Does anybody know sources in internet where described how to build an android application

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.