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 8574345
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T19:27:14+00:00 2026-06-11T19:27:14+00:00

In Play 1.2.4. you could send complex, dynamic e-mail using the standard templates mechanism

  • 0

In Play 1.2.4. you could send complex, dynamic e-mail using the standard templates mechanism and syntax (link), this looks realy cooll although I haven’t used it. Is the mailer plugin of Play2.0 capable of such things?

  • 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-06-11T19:27:15+00:00Added an answer on June 11, 2026 at 7:27 pm

    If by “complex, dynamic e-mail” you mean HTML email body based on template, you can do the same with Play 2.0.

    You just have to create a new view based on a template, for instance mailBody.scala.html:

    @(user:User)
    
    <h3>Welcome @user.name</h3>
    <br/>
    ....
    

    Then, in your method which sends an email, you just have to call the render() method of your view:

    public static void sendMail(User user) {
    
       MailerAPI mail = play.Play.application().plugin(MailerPlugin.class).email();
       mail.setSubject(...);
       mail.addRecipient(user.email);
       mail.addFrom(...);
    
       String body = views.html.mailBody.render(user).body();
       mail.sendHtml(body);
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using Play Framework, you can do something like this: public static void mymethod() {
Is there a way that I could play a sound on an event in
How i could generate database scheme based on model in play 2.0? Is there
I'm trying to play with inter-process communication and since I could not figure out
Play tutorial shows a way to bind dynamic parameter to URL: GET /clients/:id controllers.Clients.show(id:
play framework: 1.2.3 Hi, I am trying to purge my database by using play's
Does play automatically cache data? I'm trying to read this code that someone else
I'm developing an online pong game in which two players could play between them.
I was wondering if I could send an email with video, where i can
I'm using 4 USB sound cards (ASUS Xonar U1). I want to send to

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.