Jump to:

10851 Posts in 2517 Topics by 1793 members

All other Modules

SilverStripe Forums » All other Modules » Newsletter doesn't work

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 351 Views
  • Lemonie
    Avatar
    Community Member
    70 Posts

    Newsletter doesn't work Link to this post

    I am finding it very frustrating as modules just don't work out of the box and almost always need tweaking and I'm new to this.

    I have uploaded the Newsletter module. It says the next step is to add ...

    In the _config.php, add: Email::setAdminEmail();{php} (This is the email address the newsletters are sent from. It can be overwritten on a per-type basis.)

    If you have created a custom member class for the site, substitute it with the following line in the _config.php file: Object::useCustomClass("Member", "");{php}

    When I add the the first code I get:

    Parse error: syntax error, unexpected '}' in /var/sites/h/homelesshounds.org.uk/public_html/silverstripe-labs-silverstripe-newsletter-dd2e5a0/_config.php on line 17

  • Lemonie
    Avatar
    Community Member
    70 Posts

    Re: Newsletter doesn't work Link to this post

    I have gotten rid of the error by adding '' in the brackets. Now when I open the Newsletter section nothing happems no matter what I click. As far as I can see I am meant to click 'Create' but nothing happens.

  • Lemonie
    Avatar
    Community Member
    70 Posts

    Re: Newsletter doesn't work Link to this post

    Am trying to do the following but I don't have a templates file in my sites?

    Templates are created in mysite/templates/email. So for example, if you created Newsletter.ss inside mysite/templates/email then the Newsletter system will recognise this new .ss file and let you select it in the dropdown.

    This currently goes against the convention of keeping templates inside themes/yourtheme/templates/email. If you want to keep you templates inside the themes/yourtheme/templates/email folder rather then the default mysite/template/email then you need to set this line in your mysite/_config file

    :::php
    // set email template folder to themes/mytemplate/templates/email
    NewsletterAdmin::$template_paths = "themes/mytemplate/templates/email";

    351 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.