],
];
- // No recipients: Dave has `do_not_email` and Edith is dead.
+ // No recipients: Dave has `do_not_email`, Edith is dead, and Francis' email
+ // is on hold.
$cs[] = [
'2015-02-01 00:00:00',
- 'addDaveMeeting addEdithMeeting scheduleForMeeting startOnTime useHelloFirstName recipientIsActivitySource',
+ 'addDaveMeeting addEdithMeeting addFrancisMeeting scheduleForMeeting startOnTime useHelloFirstName recipientIsActivitySource',
[],
];
]);
}
+ /**
+ * Create an activity record for Francis with type "Meeting". Francis' email
+ * is misspelled and has bounced, so he should never receive an email reminder.
+ */
+ public function addFrancisMeeting() {
+ $this->callAPISuccess('Activity', 'create', [
+ 'source_contact_id' => $this->contacts['francis']['id'],
+ 'activity_type_id' => 'Meeting',
+ 'subject' => 'Subject for Francis',
+ 'activity_date_time' => date('Y-m-d H:i:s', strtotime($this->targetDate)),
+ 'status_id' => 2,
+ 'assignee_contact_id' => [$this->contacts['carol']['id']],
+ ]);
+ }
+
/**
* Schedule message delivery for activities of type "Meeting".
*/
'email' => 'edith@example.org',
'is_deceased' => 1,
]);
+ $this->contacts['francis'] = $this->callAPISuccess('Contact', 'create', [
+ 'contact_type' => 'Individual',
+ 'first_name' => 'Francis',
+ 'last_name' => 'Exemplar',
+ 'api.Email.create' => [
+ 'email' => 'frances@example.org',
+ 'on_hold' => 1,
+ ],
+ ]);
}
/**