Forums / Extensions / eZ Newsletter / Transport setting for cronjob sendout disregarded?

Transport setting for cronjob sendout disregarded?

Author Message

Eirik Alfstad Johansen

Tuesday 17 April 2007 7:15:01 am

Hi,

It seems to me like the transport setting (ezxnewsletter.ini->NewsletterSendout->Transport) is disregarded, and that the cronjob sendout uses SMTP regardless.

Is this true?

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

Tobias Struckmeier

Wednesday 18 April 2007 3:42:16 am

Hi Eirik,

I can hardly imagine that this happens. We used the version 1.0 in some projects now without having an issue like that.
Which version do you use?
Can you use the new version from svn trunk, or is it a running project?
Are you sure that you don't have any overrides which switch it to SMTP?

Cheers,
Tobias

Eirik Alfstad Johansen

Wednesday 18 April 2007 3:50:10 am

Hi Tobias,

Thanks for your reply. I'll look into this further and get back to you. However, while I have you here:

I've heard mention of a doc, but can't seem to find it. Does it exist, and if so, where can I find it?

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

Eirik Alfstad Johansen

Wednesday 18 April 2007 5:19:20 am

Hi Tobias,

I can't seemt to understand this. In my ezxnewsletter, I have the following:

[NewsletterSendout]
#Select transport class for newsletter sendout. Valid values are SMTP, sendmail or File for pregeneration.
#If SMTP selected, SMTP server must be defined in siteaccess or override settings.
#
#Transport class for preview sendout
PreviewTransport=sendmail
#Transport class for newsletter sendout via cronjob
Transport=sendmail

Yet, when I run "php -C runcronjobs.php" from shell, I get the following output:

Running extension/ezxnewsletter/cronjobs/cluster_send.php
Setting RoundRobin packagesize to: 500
Found 1 Account(s)...
Connected to dns1.netmaking.net
Available accounts: 1

Fetching mail source files
Sending 1 emails
SMTP ERROR: AUTH command failed, output: 504  authentication mechanism not supported

When I comment out the one SMTP account I've specified in ezxsmtpclustersettings.ini, I get the following:

Running extension/ezxnewsletter/cronjobs/cluster_send.php
Setting RoundRobin packagesize to: 500
Found 0 Account(s)...
No valid mailserver accounts found!

I'm assuming I'm missing something obvious here. :)

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

Tobias Struckmeier

Wednesday 18 April 2007 6:09:38 am

Hi Eirik.

when you want to send the newsletters with sendmail, you have to use the send_newsletter (and previously the build_list part) cronjob instead of the cluster_send cronjob.

I will shortly explain the supported transports and which cronjobs you need to use them.

SMTP
---------
This transport sends the newsletters via SMTP. It uses the SMTP settings configured in eZ Publish. The emails are send with the cronjobpart "send_newsletter".

Sendmail
-------------
The php mail function (sendmail) is used for the sendouts. The emails are send also with the cronjobpart "send_newsletter" (See hint at the end of this post as well).
You have the possibility to change the sendmail parameters in settings/ezsendmailsettings.ini to work with your mailserver. The default should work with the most sendmail compatible mailservers.

File
-----
The file transport writes the email source to the filesystem first. Afterwards the cluster_send cronjob processes the directory and distributes it to several SMTP servers defined in ezsmtpclustersettings.ini. Ask me about details if you need.

Conclusion is that you use the following commandline to send your newsletters:

php ./runcrojobs -s newsletter_editor send_newsletter

Note its important to use the "-s $siteaccess" parameter to define the siteaccess that should be used during sendout. It is important to ensure that the same overrides are used than in the siteaccess you previewed the newsletter. Otherwise you might have different results.

Please ensure also that you have in one of your cronjob.ini a part definition like this

[CronjobPart-send_newsletter]
Scripts[]
Scripts[]=build_list.php
Scripts[]=send_newsletter.php

In the first distributed version it was not by default this way and you had to call build_list seperately.

I hope with that I was able to answer all you questions. :)

Cheers

Eirik Alfstad Johansen

Thursday 19 April 2007 5:06:09 am

Thanks a lot, Tobias! That was enough for me to get going.

BTW, the documentation I was refering to - does it exist?

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

Tobias Struckmeier

Thursday 19 April 2007 9:58:28 am

Good :)

Sorry I forgot about the documentation. We will release some new documentation with the newsletter 1.5 release around the end of the month.