1 users online. Create an account or sign in to join them.Users
This is an open discussion with 5 replies, filed under General.
I need to send an email once per week to a list of email addresses stored in a Symphony section (its not about Viagra). The email will need to be sent via a Gmail SMTP account (which Symphony already uses).
Knowing no other way, I am considering an ex-Symphony cron-triggered PHP/PEAR solution. I'm sure Symphony and ETM could do this but don't know how. Has anyone down this or can anyone suggest a solution.
This is perfectly possible, because the ENM has an API which you can use. You might create a Symphony page and attach a custom event to it. Think of this page as a private API endpoint which can later be called by Cron.
I am afraid that there is no API documentation, but you can take a look at the source to find the possibilities. Basically you can do things like:
$newsletter = EmailNewsletterManager::create($newsletter_id);
You can also save a newsletter:
'template' => is_object($newsletter->getTemplate()) ? $newsletter->getTemplate()->getHandle() : NULL,
'sender' => is_object($newsletter->getSender()) ? $newsletter->getSender()->getHandle() : NULL,
'recipients' => implode(', ', $newsletter->getRecipientGroups(false, true)),
'started_by' => $author_id,
'pseudo_root' => 'http://' . $this->_client_domain,
(The above example could be used to restart a newsletter, i.e. create a new one.)
(If you pass the ID as well, you will manipulate an existing one.)
I don't know where your content will come from, so I can't give you a more detailed advice.
Thanks Michael this is a great start. Will investigate
Keep in mind that a "newsletter" is just a special entry in the email_newsletters table in the DB. Each row contains the information necessary to send a newsletter. A newsletter entry (row) will be created when a section (with a newsletter field) is saved. Once it is saved, you can start/pause/stop it. If you restart a newsletter, a new one is actually created.
You get the idea if you send newsletters from the Symphony backend and watch the database table change.
So the newsletter field is just a "remote control" for newsletters. You can do the same things with the API.
Something different: Google isn't a very good provider for what you're trying to achieve. Have you ever looked at Amazon SES, Sendgrid or Postmark?
They generally offer faster (and more reliable) delivery, and are very, very cheap. I am using SES for newsletters and Postmark for transactional emails, and I haven't had a single problem since I switched, while I was having lots of problems before.
Create an account or sign in to comment.
Contact the team
Symphony • Open Source XSLT CMS