Have been using the com.cividesk.email.sparkpost extension (v1.1) successfully on Civi 4.6.30 . Recently had an issue due to installing PHP mcrypt on the server, which caused the extension to be unable to retrieve the SparkPost API key. [More accurately: the call to CRM_Sparkpost::getSetting('sparkpost_apiKey') was returning a scrambled value.] This was resolved, once the problem was diagnosed, by re-entering the API key. (I've written a separate Q&A about that issue, as it's not SparkPost specific.)

During the time when the API key couldn't be accessed, numerous transactional emails and CiviMails should have gone out. The CiviMails can be re-sent easily enough but what's the way to deal with the transactional emails? There's no record in the extension's log file of mails that attempted to send during this period. Is there any queueing system for failed messages? Because the API key couldn't be correctly retrieved, presumably the messages won't have been linked to the user's SparkPost account. The SparkPost stats show no messages over that period.

1 Answer 1


I have two outside ideas that 'might' be helpful:

  1. Is it possible Activities have been made for the emails that should have gone out? Emails from the Contact record will almost certainly have created an activity, and it's a commonly set option for emails sent via Scheduled reminders. If an activity has been made it will probably contain the email.
  2. Do you have email logging turned on? Presumably not or you wouldn't be asking the question! But perhaps worth checking...
  • Thanks, I was hoping the extension may have maintained a queue or log of messages that couldn't be sent but I haven't found evidence of this, so it's a matter of doing detective work to figure out what should have been sent. By email logging, did you mean CIVICRM_MAIL_LOG or mail server logging? CIVICRM_MAIL_LOG was off and the mail server doesn't see the messages as they are submitted by the extension directly to Sparkpost using their API.
    – davejenx
    Aug 22, 2017 at 14:49
  • Re email logging - I meant both of those possibilities. Sorry they aren't able to help and I wish I had further ideas to offer. :(
    – Andyg8
    Aug 22, 2017 at 19:34
  • Thanks, I believe the end user has now tracked down what needed to be re-sent.
    – davejenx
    Aug 23, 2017 at 11:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.