1

Is there any way to restore a mailing after you delete it? Or even find it?

We are using CiviCRM 5.8.12 with WordPress. We use Mosaico for some mailings.

2

Two answers:

Do you have detailed logging eanabled? If no, then no - you can restore a backup of your database (to a test site) and copy the data out.

If you have advanced logging enabled: you can use SQL. You need to know the ID of the deleted mailing - you can check the titles with SELECT DISTINCT id, name FROM log_civicrm_mailing.

Once you find the ID number, substitute the X at the end of this query for the ID.

INSERT INTO civicrm_mailing (id, domain_id, header_id, footer_id, reply_id, unsubscribe_id, resubscribe_id, optout_id, name, mailing_type, from_name, from_email, replyto_email, subject, body_text, body_html, url_tracking, forward_replies, auto_responder, open_tracking, is_completed, msg_template_id, override_verp, created_id, created_date, scheduled_id, scheduled_date, approver_id, approval_date, approval_status_id, approval_note, is_archived, visibility, campaign_id, dedupe_email, sms_provider_id, hash, location_type_id, email_selection_method, language, template_type, template_options, modified_date) SELECT id, domain_id, header_id, footer_id, reply_id, unsubscribe_id, resubscribe_id, optout_id, name, mailing_type, from_name, from_email, replyto_email, subject, body_text, body_html, url_tracking, forward_replies, auto_responder, open_tracking, is_completed, msg_template_id, override_verp, created_id, created_date, scheduled_id, scheduled_date, approver_id, approval_date, approval_status_id, approval_note, is_archived, visibility, campaign_id, dedupe_email, sms_provider_id, hash, location_type_id, email_selection_method, language, template_type, template_options, modified_date 
FROM log_civicrm_mailing WHERE log_action = 'Delete' AND id = X;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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