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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T20:05:32+00:00 2026-06-16T20:05:32+00:00

in grails-mail plugin you need do define your inline image data in your service,

  • 0

in grails-mail plugin you need do define your inline image data in your service, assuming you are using grails mail from a service.

you do this like so in your service.groovy

inline 'header', 'image/jpg', new File('./web-app/images/mailAssets/alert_header_pre.png')

inside your service definition, lets say:

def mailService
def contactUser(userName, email) {
    mailService.sendMail {
        multipart true
        to email
        from "marc.heidemann@live.de"
        subject "Hello from grails-mail"
        text "Hallo from grails-mail multipart text modus"
        html view:"/alert/test", model:[name:userName]
        inline 'header', 'image/jpg', new File('./web-app/images/mailAssets/alert_header_pre.png')
        inline 'footer', 'image/jpg', new File('./web-app/images/mailAssets/suchebottomre.gif')
    }
}

for now, the app is rendering the footer and the header image, Ok.

alright, now the plan of the planners of this project is to render profile pictures from database (about 15.000 users) in their emails – can and if then how can this be achieved without declaring every user’s profile picture inside the service.groovy? Furthermore those pictures are stored outside of my app at amazon s3. might this be a boundary of mail plugin or is it possible to get this working? What would you offer those planning and creative guys as an alternative if it is not possible to do so? any opinions are welcome.

  • 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-16T20:05:33+00:00Added an answer on June 16, 2026 at 8:05 pm
    1. Loop through your users.
    2. Get the corresponding picture from S3 using the grails-aws-plugin.
    3. Insert picture into email
    4. Send mail using the mail-plugin

    That way you don’t have to declare it in the service. You can download the pictures from S3 to use them as inline pictures or you could use a url provided by S3.

    To access the file for inline usage:

    def file = aws.s3().on(bucket).get(name, path)
    

    To get a public url:

    def url = aws.s3().on(bucket).url(name, path)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm sending multipart mails with attachment from my grails application using the mail plugin
I am using grails Async Mail plugin to send emails with attachments in my
I am currently using Grails Mail 1.0 plugin in my project. I used it
I'm trying to send mail from my Grails app with mail plugin. It worked
My Grails app is using the Spring Security plugin. I need to login a
I'm using Grails Mail plugin and trying to send email and keep getting: Error
I'm using the Grails mail plugin to send email through Amazon SES. Amazon SES
In Grails 1.3.7, I have a domain model like this: abstract class A {
Using Grails database-migration I have a table in production defined like so: +--------------+------------+------+-----+---------+----------------+ |
I am trying to send mail through grails mail plugin. I configured according 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.