Search

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

Thans Michael, that would be really helpful

This post has been edited because it was wrong and misleading. It answers the question by @stuartgpalmer

I don't think that you need such complicated ideas. ENM and ETM are very powerful, and so I suggest to look for "native (Symphony)" ways to solve your issue.

I tried the following in a test installation of mine, and it worked. I hope that my description will be sufficient.

Basics

Create the sections:

  • Members
  • Events
  • Attendees — here I used two SBL fields (one for the Event, one for the Member)

Add some dummy data to all these sections. (Members have email addresses which belong to me, of course.)

Create the newsletter stuff:

  • a sender ("Event Admin")
  • a default email template ("Mail to attendees")
  • a recipient group ("Event attendees") — returning Members, unfiltered, for the moment.

Then add an Email Newsletter Manager field to the section "Events". (In the end you should be able to send from the event's edit page.) I called the field "Mail to attendees" (although the recipient group is still unfiltered at this point).

I tested that I can send to all Members on an "Event"'s edit page. (This is your "Event", not a Symphony event.)

Filtering the Members, Datasource Chaining

In order to get this right, you need to know that the template preview has a debug mode. Just append ?debug to the preview URL. (Make sure that you are using ENM 1.1.3)

The second thing to know: For filtering you can use $enm-newsletter-id to get your current entry — this param will be provided by the ENM upon sending. It is the ID of your Newsletter and can be used to filter your entries on the ENM field to get the current entry.

  • Create a DS (called "ETM: Event") which outputs the system ID parameter ($ds-etm-event-system-id) and add it to your ETM template. Filter on the Email Newsletter Manager field using {$enm-newsletter-id:0}.

  • Create a DS called "ETM: Event Attendees" and add it to your ETM template. Filter on the "Event" SBL field using {$ds-etm-event.system-id}. Ouput the Member IDs ($ds-etm-event-attendees.member). For debugging purposes, add the ID of one of your "Events", e.g. {$ds-etm-event.system-id:14}. (This Event should have attendees!) You should see some data in the debug view of your ETM template now. For production, I suggest to use {$ds-etm-event.system-id:0}.

  • Use the latter parameter to filter your ENM recipient group (on the System ID field, use {$ds-etm-event-attendees.member:0}).

Now for Symphony to get the chaining stuff right, it must know the Datasource dependencies. But ENM will not automatically create Datasource dependencies for you, nor will it resolve the hierarchy if you have multiple levels of dependencies (@creativedutchmen: Is this a bug? Or have we never promised that? I hope it's the latter…). Fortunately, the fix is pretty simple: You must add the dependencies to your recipient group's PHP file, in the order in which they should be executed. In recipient_group.event_attendees.php you find this:

    public $_dependencies = array (
);

Add your dependencies:

    public $_dependencies = array (
  0 => '$ds-etm-event',
  1 => '$ds-etm-event-attendees',
);

(Please note that ENM still expects "pure" datasource names here without any field name, different from Symphony 2.3.)

Et voilà! It works! :-)

I am sorry. It doesn't work.

I will try to find the culprit a bit later. Have to leave the keyboard for 2 or 3 hours.

Thanks Michael. I will look out for your next post. What I can say at this point is that the Events attendees section is made of text fields simply containing the IDs of the member and the event. There are thousands of rows of data in the table and its in use on a production site so I don't know how practical it would be to convert them to SBLs.

Presumably this wouldn't affect the theory of your solution though?

I edited the above post. It should work now. I suggest to try that in a plain (default workspace) installation with test data in order to understand the whole stuff.

Regarding the field types: If you can filter on these fields in standard Symphony datasources, you should be fine.

Complete forgot to answer this question by @wyrm, sorry:

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?

No, it is not possible without writing PHP. And at the moment I don't even have an idea how to do this. The issue is not the ENM, but the ETM (Email Template Manager). The ENM has delegates, and so it is for example possible to inject your own parameters and pass them to the ETM. That might help on the ENM part, but unfortunately the ETM has no possibility to add attachments.

Does anybody have an idea (or solution)?

@wyrm: How many emails would you need to send? (Using Symphony's Core Email API, it would be possible to send single emails with attachments. Or a few.)

Thanks for your detailed explanation Michael. It not only works, but gives me an idea of what I can and can't do with ETM. Du bist ein Heiliger :-)

You're welcome.

Du bist ein Heiliger

Oh, thanks. :-))

Die Bayern wieder … ;)

Oh, is Stuart Bavarian? Never considered that.

Hi,
Got a question about performance;
Would it be a problem sending around 6500 emails on a shared host?

Would it be a problem sending around 6500 emails on a shared host?

Performance wise: no, not at all. I have sent around 10k emails using a shared host, and it worked just fine.

However, I would recommend using an emailing service for the emails themselves. Something like Amazon SES would be heaps better than using the shared hosts servers. Also, the pricing is very affordable; around 65 cents for 6.5k emails.

edit: I completely forgot to elaborate on why a service is better than the shared host. Most shared hosts have little expertise (and interest) in keeping their email servers running as they should. This means the IPs are often blacklisted, so despite all your hard work in crafting a beautiful email it will end up in spam boxes.

Now, of course, your ISP might be different, but I found that even if their IPs are not blacklisted now, they might very well be in two weeks (or days).

Good!
What about Gmail like in the read me?
And if i would use Amazon, Can i just set it up in the 'Email Gateway' settings?

What about Gmail like in the read me?

Bad idea. They do not like being used as a commercial relay.

And if i would use Amazon, Can i just set it up in the 'Email Gateway' settings?

Yes. I believe they now offer a SMTP option, but there is also the Amazon SES gateway somewhere. The gateway (which uses the Amazon API) is supposed to be better, because it can get more information on why something failed, but I do not think any of the more advanced functionality is built in, so you might as well go for the SMTP route.

Ok, thanks a lot!
I am gonna look into this Amazon matter... :-)

Email Newsletter Manager updated to version 2.0.1 on 13th of June 2014

Compatible with Symphony 2.4

The Email Newsletter Manager is finally compatible with Symphony 2.6. Have fun!

You know where to get it, don't you?

Woop! lovely stuff. Thanks Michael and Huib.

I am having some problems getting ENM working on Sym 2.6.2.

When I try to create a new recipient list I het this error:

Symphony Recoverable Error: Argument 2 passed to General::arraytoxml() must be an array, null given, called in /var/www/clients/client2/web7/web/extensions/emailnewslettermanager/content/content.recipientgroups.php on line 87 and defined

When I try to create a sender I get this error:

Symphony Fatal Error: Call to undefined method SMTPGateway::setHeloHostname() An error occurred in /var/www/clients/client2/web7/web/extensions/emailnewslettermanager/content/content.senders.php around line 115

Can anyone offer any guidance on this? Has anyone else used this extension with 2.6.2?

Thanks!

I have no such issues, working with Symphony 2.6.7. Which version of ENM do you use?

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