Main Content

Magnolia Community Forums: Magnolia User Groups: How to use sendMail in Freemarker


  • kevinBC
    kevinBC
    Full name: Kevin Pfaff
    Posts: 7
    Last post: Feb 21, 2017 9:25:30 AM
    Registered on: May 20, 2014
    How to use sendMail in Freemarker
    #1 by kevinBC on May 21, 2014 6:14:32 PM

    Hello,

    I am trying to implement a contact-form and want to use the smtp module from magnolia (5.2.3). I read https://documentation.magnolia-cms.com/display/DOCS/Mail but there is no description on how to implement it.
    I don't want to use the stk.
    Is there a simple example on what configuration is needed in magnolia and what freemarker commands are used?

    Thanks & regards,
    KBC

  • mathiaslin
    mathiaslin
    Full name: Mathias Conradt
    Posts: 29
    Last post: Jan 11, 2017 8:11:17 PM
    Registered on: Aug 17, 2015
    Re: How to use sendMail in Freemarker
    #2 by mathiaslin on Sep 3, 2015 3:12:06 PM

    I have the same question. Want to send a simple mail upon a certain page request. So simple that I don't want to use the MVC pattern via Blossom here. Did you find a solution?

  • runger
    runger
    Full name: Richard Unger
    Posts: 571
    Last post: Feb 1, 2017 9:54:59 AM
    [magnolia-user-groups] How to use sendMail in Freemarker
    #3 by runger on Sep 8, 2015 3:11:47 PM

    Hi,

    This can be solved with a minimal amount of Java (or Groovy) development:

    Create a simple model class which provides setters for the parameters you need.
    In the execute() method of the model class, check the parameters, and if everything is ok, send an email using the Mail Module.
    Use the model in your template, area or component.

    Regards from Vienna,

    Richard

You don't have the permission to post on this thread

Sign in

To login on this forum, you can use your Magnolia Forge, Support or Partner account, or, below, your Google, Yahoo! or OpenID account. If you have trouble logging in, or any other sort of issue, please let us know in the Meta forum, on the user-list, or simply by email at forum-admin at magnolia-cms dot com.

* Required

... or sign in with:

  • icon http://{your-openid-url}
  • icon
  • icon https://me.yahoo.com/