Search

If it shows the correct number of recipients, the addresses should also work in Swift Mailer. The extension is pre-checking addresses (using if(filter_var($email, FILTER_VALIDATE_EMAIL))).

Have you verified that your recipients XML is fine?

Please also double-check the sender credentials. Maybe the error message is misleading.

BTW: The successor will have a new name: Email Newsletter Manager (ENM). This will allow installing it in parallel, which is very useful feature because ENM will be completely different (a.k.a. incompatible - there will be no upgrade path). So the transition from the old to the new extension can be made step by step. You won't need to uninstall the old extension first.

I think the XML is fine, could it be a problem because I use the email for the name as well? I can't wait for that new extension :)

recipients:

<data>
<params>
<today>2011-06-20</today>
<current-time>14:47</current-time>
<this-year>2011</this-year>
<this-month>06</this-month>
<this-day>20</this-day>
<timezone>+02:00</timezone>
<website-name>WEBSITE</website-name>
<page-title>recipients</page-title>
<root>http://hinterhof.ch</root>
<workspace>http://hinterhof.ch/workspace</workspace>
<root-page>recipients</root-page>
<current-page>recipients</current-page>
<current-page-id>99</current-page-id>
<current-path>/recipients/</current-path>
<parent-path>/</parent-path>
<current-url>http://hinterhof.ch/recipients/</current-url>
<upload-limit>5242880</upload-limit>
<symphony-version>2.2.1</symphony-version>
<cookie-username>USERNAME</cookie-username>
<cookie-pass>COOKIE</cookie-pass>
<site-mode>live</site-mode>
</params>
<events>
<login-info logged-in="true" id="1" user-type="developer" primary-account="yes">
<name>Christopher Scott</name>
<username>mckean</username>
<email>EMAIL@DOMAIN.ch</email>
</login-info>
</events>
<recipients>
<section id="26" handle="templist">TempList</section>
<entry id="1259">
<email handle="handle-handlecom">EMAIL@DOMAIN.com</email>
</entry>
<entry id="1201">
<email handle="handle-handlech">EMAIL@DOMAIN.ch</email>
</entry>
</recipients>
</data>
<!--
<events> <login-info logged-in="true" id="1" user-type="developer" primary-account="yes"> <name>Christopher Scott</name> <username>USERNAME</username> <email>EMAIL@DOMAIN.ch</email> </login-info> </events>
-->

I wouldn't think so. Let's test it out quickly: Try to use a static value for the name.

Yes, your XML looks fine.

I use the email for the name as well

Are you sure? You posted this config:

<recipients>
    <group id="1" page-id="99" entry-node="entry" name-node="name" email-node="email" code-node="code">some Group</group>
</recipients>

Yeah that is all correct... hmmm

I get the following error in my postfix log:

Aug  4 11:57:33 www postfix/smtpd[24308]: lost connection after UNKNOWN from www.hostcloud.ch[78.46.135.66]

any ideas? :)

Thanks!

Okay so I'm testing using gmail as a mailserver now. That's the error I get now:

Caught exception: Address in mailbox given [] does not comply with RFC 2822, 3.6.2.

The second error is probably thrown by Swiftmailer (which is included in the extension as email framework), telling you that Swiftmailer thinks one of the email addresses is invalid. Since the extension checks recipient addresses before passing them to Swiftmailer, I would assume that it's the sender address which is invalid.

The first error is hard, it may have different reasons.

In the successor to the Email Newsletters extension (which is under development) we won't use Swiftmailer anymore, because it is too big (and not very well supported anymore).

Can you post your XML configuration (without passwords, of course)?

Hmmm, is it still the same config that you posted earlier? Looks good to me.

Does the process work in debug mode? (It should.)

Jey finally got it to work!

I had to include the following: from-email="" from-name="" reply-to-email="" reply-to-name="" return-path=""

you used this in the full-blown example but not in the minimal one...

so I guess one of these attributes is necessary for the swift mailer!

cheers and thank you for the patience.

I am very glad that you got it working (because it is so hard to debug this biest). :-)

Hey Michael, how is it with the newest release 2.2.3? Should it work?

Thanks!

Cheers...

It should work. If anything goes wrong, please post the issue on Github.

@creativedutchmen and me are still working on the successor.

I'm so looking forward to this :)

Thanks for everything!

Ok, ok. This extension is brilliant! I setup whole newsletter, it sends, throttles, just works. I have created subscription pages, page to manage the subscription, confirmation emails and everything that is necessary to handle whole solution.

I just can't figure one thing. How can I refer to recipient's name in the email template? Shouldn't the extension send parameter with name, email and code to template pages so that we could write:

"Dear {$recipient-name},"

I couldn't find a way to do that.

Please help :)

Email Newsletters has a different method of personalization.

Step 1: Build the node you need inside your entries on your recipients XML page, e.g.:

<xsl:element name="entry">
    <xsl:element name="email">
        <xsl:value-of select="email"/>
    </xsl:element>
    ...
    <xsl:element name="salutation">
        <xsl:choose>
            <xsl:when test="first-name != ''">
                <xsl:text>Dear </xsl:text>
                <xsl:value-of select="first-name"/>
                <xsl:if test="last-name != ''">
                    <xsl:text> </xsl:text>
                    <xsl:value-of select="last-name"/>
                </xsl:if>
                <xsl:text>,</xsl:text>
            </xsl:when>
            <xsl:otherwise>
                <xsl:text>Dear subscriber,</xsl:text>
            </xsl:otherwise>
        </xsl:choose>
    </xsl:element>
</xsl:element>

(That might be much simpler in your case.)

Step 2: Inlcude a placeholder somewhere on your email content page (HTML/Text), e.g.:

<p>[[salutation]]</p>

Step 3: Tell Email Newsletters what to replace and where to find it. This is done in the field configuration XML:

<recipients>
    <group id="1" page-id="150" url-appendix="?approved=yes" entry-node="entry" email-node="email" code-node="uid" salutation-node="salutation">Approved Members</group>
</recipients>
...
<search-strings>
    <item replacement-node="salutation-node">[[salutation]]</item>
</search-strings>

(Look at the occurences of salutation-node in this example code.)

BTW: The reason behind this is the fact that Email Newsletters builds content pages only once, immediately before sending. So these (HTML/text) pages have to include placeholders. The actual replacement is done by Swiftmailer upon sending.

This will be completely different with the soon-to-be-released-as-beta successor extension called Email Newsletter Manager. Content will be built for each email separately, and thus parameters can be used to filter the templates' datasources. This is a a much more powerful approach. And much more elegant: It uses the Core Email API (no Swiftmailer anymore) to send emails and the Email Template Manager extension to build the content.

When the Email Newsletter Manager is released as version 1.0 (stable), Email Newsletters will be deprecated. But you don't need to worry too much, because:

  1. I will definitely support Email Newsletters for a while (at least some months).
  2. You will be able to install and use both extensions in parallel to manage a smooth transition.

Michael,

Thank you so much for elaborate answer! Of course that explains the matter completely and after tests today I confirm it absolutely works.

I can't wait for Email Newsletter Manager :)

Still, Email Newsletters is an amazing piece of work and I greatly thank you for that!

:-) Thanks!

Hi Micheal (yes, I ended up using this version of the extension!)

My client sent out her first email to her members yesterday and it only went out to 50 out of 210. The log says this...

--- 2011-11-03T22:36:00+00:00: mailing recipients 1 to 50 START

Recipients:
Array
(
    [email@email.com] => Fred
)

Failures:
Array
(
)

--- 2011-11-03T22:36:00+00:00: mailing recipients 1 to 50 END

The main Symphony log doesn't give any more information. The extension uses Google Apps SMTP service and I'm wondering if Google has blocked the send out. The throttling was set to"

<throttling>
    <emails-per-time-period>50</emails-per-time-period>
    <time-period-in-seconds>30</time-period-in-seconds>
</throttling>

Perhaps that was a bit high. Can you please shed any light on why the process might have stopped and if the log would record if Google puts the brakes on.

Thanks

Stuart

I assume that you shortened the log, didn't you? There should be 50 lines in the "Recipients" array.

I wouldn't send so fast to Googlemail (I suggest max. 10 emails every 10 seconds), but I don't think that this was your problem.

If the above is the end of the log, I think that the process loop broke for some reason.

Are you on shared hosting?

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