CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Question about CRM_Core_BAO_MessageTemplate::sendTemplate
Pages: [1]

Author Topic: Question about CRM_Core_BAO_MessageTemplate::sendTemplate  (Read 788 times)

VitorFF

  • I post occasionally
  • **
  • Posts: 35
  • Karma: 1
  • CiviCRM version: 4.4.11
  • CMS version: Drupal 7.27
  • MySQL version: 5.5
  • PHP version: 5.4
Question about CRM_Core_BAO_MessageTemplate::sendTemplate
February 04, 2015, 02:56:02 am
Hello everyone,

I'm writing a Civi scheduled job to send emails to our members with the latest updates to their network regularly - in a frequency they chose.

When the cron job runs I determine which members should receive an email and send it using CRM_Core_BAO_MessageTemplate::sendTemplate . I'm calling this once for every member with different params (name, email, etc). There are also tokens being replaced on the message template.

I would like to know if this method of sending the emails is queued/scheduled, because I don't want to halt our server to a stop if by any remote chance I have so send them all an email on the same day.
Or should I email them in another way?

Thank you for your time,

Vitor Nobrega
Why don't you take a look at this? (You will not regret it!)

Capitalisation Corrector : https://civicrm.org/extensions/capitalisation-corrector

totten

  • Administrator
  • Ask me questions
  • *****
  • Posts: 695
  • Karma: 64
Re: Question about CRM_Core_BAO_MessageTemplate::sendTemplate
February 04, 2015, 03:56:48 am
No, I don't believe that has any queuing/scheduling built-in. AFAIK, the only time there's queuing/throttling is with CiviMail blasts. "Scheduled Reminders" do have a scheduling component ( :) ) but I'm not aware of a queuing/throttling mechanism in there.

If you need support for queuing/throttling *all* outbound messages (not just CiviMail blasts), then you might setup your own intermediate SMTP server (e.g. Postfix/Exim/Sendmail) and cozy up with a good configuration manual (and a big pot of tea).

If the queuing/scheduling needs to be something more nuanced, then I don't think anything off-the-shelf will work.

VitorFF

  • I post occasionally
  • **
  • Posts: 35
  • Karma: 1
  • CiviCRM version: 4.4.11
  • CMS version: Drupal 7.27
  • MySQL version: 5.5
  • PHP version: 5.4
Re: Question about CRM_Core_BAO_MessageTemplate::sendTemplate
February 04, 2015, 06:40:17 am
Thanks for your reply totten,

I think the scheduling component will suffice, but its good to know what other options are out there.

Thank you!
Why don't you take a look at this? (You will not regret it!)

Capitalisation Corrector : https://civicrm.org/extensions/capitalisation-corrector

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Question about CRM_Core_BAO_MessageTemplate::sendTemplate

This forum was archived on 2017-11-26.