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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T10:21:02+00:00 2026-05-19T10:21:02+00:00

When emails are rendered from templates, the templates are looked up in grails_app/views: mailService.sendMail

  • 0

When emails are rendered from templates, the templates are looked up in “grails_app/views”:

mailService.sendMail {
    from sender
    to recepient.email
    subject "Don't forget"
    body  (view: "/emails/reminder",
        model:[recepient: recepient, document: document])
}

How can I put the mail templates outside of the application (war file) into the file system?

  • 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-19T10:21:03+00:00Added an answer on May 19, 2026 at 10:21 am

    There are two options:

    1. Store your templates as text in the database, and generate the default crud code to update them. You would then modify the email code to pull the data out of the database using domain objects.
    2. Store the templates as strings in a Groovy config file. Groovy can use external configuration files that can be edited separately from the packaged application. See this blog postfor details.

    Once you have your string, you can use the GSP engine from a Grails controller with any arbitrary string to create a view. See this blog post for more details.

    In short, you would store your template as a string using one of the listed options and then use the Grails GSP engine to create the view once you retrieved the template string.

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

Sidebar

Related Questions

Can we send emails from Rails application using Amazon SES SMTP service where sender's
This program reads emails (really just a .txt file structured like an email) and
I need to send emails from my web application (on account creation, password reset,
I want to send emails with formatted sender such as Support team foo@bar.com. If
I'd like to send emails from a table every night at midnight, so I've
I was using only html emails which worked from my Rails 3.1.4 app, but
I'm trying to generate emails with rendered PDF attachements using ActionMailer and wicked_pdf. On
I'm trying to send emails but the emails will never use my :from =>
I'm trying to fetch some email info from gmail using imap like this (BODY.PEEK[HEADER.FIELDS
First time every trying to send an email from Rails. It seems to be

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.