Search

We fixed the Symphony issues — a pull request has been sent and should be in Symphony > 2.3.1RC1).

We also officially released a 2.3-compatible version of the Email Newsletter Manager.

[EDIT]: You know where to get it, don't you?

Thank you Huib and Michael for putting so much work into this.

I have a problem creating the recipient group. Actually, it's not really a problem as it gets created, but wanted to let you know anyway.

Upon creating the group I get this error:

Fatal error: Call to a member function fetchHandleFromID() on a non-object in C:wwwstartuptrentinoextensionsemail_newsletter_managercontentcontent.recipientgroups.php on line 173

The recipients are only filtered by a "yes" value of a checkbox.

Seeing the list with the group created and the (correctly filtered) number of recipients is ok. Only when I try to open the entry, the error appears.

I haven't done anything else, only set up the sender and this recipient group.

PS. It's 1.1 version on a 2.3.1 installation.

@ellie, would you mind posting the issue on github? I am surely going to forget about it in the next few days, and that would be a shame:)

Done. Thank you, Huib.

Meanwhile there is another thing I am not sure about:

Can i trigger "Send" from the frontend by adding the field (if yes, what value), or is a custom event needed?

You will need a custom event which "talks" to the ENM's API. But: Sending is not enough. What about "pause", "stop" etc.? If you want to manage newsletters from the frontend, this will be a bit of work. But it is definitely possible.

Why do you attempt do do this? What is your use case?

Thanks, Michael.

The use case is probably common when implementing the members extension. I want to send notification emails to members when new entries get added (to members that want to receive such notifications).

I presumed that the most logical process would be to trigger the Send with the event that adds the new entries. Maybe I'm wrong?

For now I am doing it with ETM since it is a small closed group of users, but it was only a temporary decision. They are growing...

Ah, I see.

Basically sending a newsletter is pretty simple:

try{
    $newsletter = EmailNewsletterManager::create($newsletter_id);
    $newsletter->start();
}
catch(Exception $e){
    Frontend::instance()->customError(__('Error sending email newsletter'), __($e->getMessage()));
}

But of course you will need to save the ENM field's content (which is the newsletter data) first. If you don't want to use hidden fields, you will need some custom logic for this as well.

But assumed that you have only one template, one sender and one recipient group for this ENM field, I think that there is no security risk in using hidden fields, because ENM won't allow to save templates, recipient groups or senders which have not been configured for a field. (@creativedutchmen: Please correct me if I am wrong.)

So basically all you need in addition to the above code is:

  • hidden fields in your form (sender, recipientgroup, template)
  • find the newsletter ID when the entry has been saved.

If you know the field ID of the ENM field, you can get the (current) newsletter ID like so:

$data = Symphony::Database()->fetchRow(0, "SELECT * FROM `sym_entries_data_".$field_id."` WHERE `entry_id` = '".$entry_id."' LIMIT 1");
$newsletter_id = $data['newsletter_id'];

(Your event should use the EventPostSaveFilter delegate. In this case the entry ID is in $context['entry_id'].)

As you see, you will have to get your hands a bit dirty to use the ENM from the frontend. But it's definitely possible :-)

Thanks a lot, Michael! With your guidelines I can do it even without knowing PHP.

And also thank you and Huib for these two great extensions.

I can do it even without knowing PHP

Hehe, just like me! :-)

You are welcome, @ellie.

Hi, is it possible to send newsletters with PDF files as attachements ? Is there some option for adding files as attachments to emails and send them by this extension?

Thanks for reply

Hi. I am trying to install the latest version of ENM with Symphony 2.3.1 and ETM 5.0.

The installation goes fine but when I add a recipient group, I get this error:

Symphony Fatal Error Line: 135 - loadXML(): xmlParseEntityRef: no name in Entity, line: 1

The log shows this:

18 October 2013 15:34 > UNKNOWN: SymphonyErrorPageHandler 0 - Line: 135 - loadXML(): xmlParseEntityRef: no name in Entity, line: 1 in file /srv/www/website.com/publichtml/extensions/emailnewsletter_manager/lib/class.extensionpage.php on line 62

If I comment out the offending line it works:

//throw new SymphonyErrorPage(trim($errstr), NULL, 'xslt-error', array('proc' => clone $this->_XSLTProc));

But I know that commenting out lines of other people's code isn't always a good thing! Any ideas?

There seems to be an error with some part of XML anywhere in the recipient group.

Can you post the XSLT you are using to grab the names and addresses?

Hi Huib. Sorry, I should have been clearer with my question. The error is thrown when I click "Create new". At present there are no recipient groups set up.

I tested this on a fresh Symphony 2.3.1 installation (w/ default workspace), and I can not confirm the issue.

Thanks Michael. So that in mind I went through a long debugging process and found out that ENM doesn't play nicely with the Pages Select Box Field. If I delete that field from the one section its used in, the error goes away.

Lord knows why, but thankfully I can work around this by phasing out that extension. Is this worth logging as a bug? If so, which extension has the bug? Thanks for both of your help. I can't wait to start using the extension.

I will test a bit tomorrow and post my findings.

I have the extension up and running and have a few questions:

My aim is to send emails to all members who have signed up to specific events.

The section structure

  • Members (email, first name field)
  • Events (name and details of event)
  • Event attendees (text fields for member-id, event-id and signup status)

The aim

  • Firstly I'd like my client to be able to send a group email to members who have signed up to a certain event. Since their contact details are in a separate section to the 'Event attendee' section I don't see how I can do this.
  • Secondly I'd like my client to be able to choose an event when creating the email and only to email people signed up to that event. Even if I could create the data source above, I don't see how I could filter it by event ID.

I may be trying to do more with the extension than is intended, but it strikes me that if I could use a dynamic DS (with the source being an XML formatted page in Symphony), I'd be half way there.

The only other way I can think of is to generate the XML as a Symphony page and use XML importer running via cron to bring the right information into a new dedicated section which would contain the right information. This seems a bit convoluted and processor heavy and still wouldn't solve the filtering by event ID issue.

So that in mind I went through a long debugging process and found out that ENM doesn't play nicely with the Pages Select Box Field. If I delete that field from the one section its used in, the error goes away.

I am sorry, but I can not replicate this issue. I installed the Pagesfield extension to a fresh Symphony 2.3.1 installation and added the field to a section, but I couldn't see any issues when creating new recipient groups.

My aim is to send emails to all members who have signed up to specific events.

Regarding these ideas, I will try and post some pointers soon. (Unfortuantely I don't have much time at the moment.)

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details