|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
class Mandrill_Rejects |
|
4
|
|
|
{ |
|
5
|
|
|
|
|
6
|
|
|
private $master; |
|
7
|
|
|
|
|
8
|
|
|
public function __construct(Mandrill $master) |
|
9
|
|
|
{ |
|
10
|
|
|
$this->master = $master; |
|
11
|
|
|
} |
|
12
|
|
|
|
|
13
|
|
|
/** |
|
14
|
|
|
* Adds an email to your email rejection blacklist. Addresses that you |
|
15
|
|
|
add manually will never expire and there is no reputation penalty |
|
16
|
|
|
for removing them from your blacklist. Attempting to blacklist an |
|
17
|
|
|
address that has been whitelisted will have no effect. |
|
18
|
|
|
* @param string $email an email address to block |
|
19
|
|
|
* @param string $comment an optional comment describing the rejection |
|
20
|
|
|
* @param string $subaccount an optional unique identifier for the subaccount to limit the blacklist entry |
|
21
|
|
|
* @return struct a status object containing the address and the result of the operation |
|
|
|
|
|
|
22
|
|
|
* - email string the email address you provided |
|
23
|
|
|
* - added boolean whether the operation succeeded |
|
24
|
|
|
*/ |
|
25
|
|
|
public function add($email, $comment = null, $subaccount = null) |
|
26
|
|
|
{ |
|
27
|
|
|
$_params = array("email" => $email, "comment" => $comment, "subaccount" => $subaccount); |
|
28
|
|
|
return $this->master->call('rejects/add', $_params); |
|
29
|
|
|
} |
|
30
|
|
|
|
|
31
|
|
|
/** |
|
32
|
|
|
* Retrieves your email rejection blacklist. You can provide an email |
|
33
|
|
|
address to limit the results. Returns up to 1000 results. By default, |
|
34
|
|
|
entries that have expired are excluded from the results; set |
|
35
|
|
|
include_expired to true to include them. |
|
36
|
|
|
* @param string $email an optional email address to search by |
|
37
|
|
|
* @param boolean $include_expired whether to include rejections that have already expired. |
|
38
|
|
|
* @param string $subaccount an optional unique identifier for the subaccount to limit the blacklist |
|
39
|
|
|
* @return array Up to 1000 rejection entries |
|
40
|
|
|
* - return[] struct the information for each rejection blacklist entry |
|
41
|
|
|
* - email string the email that is blocked |
|
42
|
|
|
* - reason string the type of event (hard-bounce, soft-bounce, spam, unsub, custom) that caused this rejection |
|
43
|
|
|
* - detail string extended details about the event, such as the SMTP diagnostic for bounces or the comment for manually-created rejections |
|
44
|
|
|
* - created_at string when the email was added to the blacklist |
|
45
|
|
|
* - last_event_at string the timestamp of the most recent event that either created or renewed this rejection |
|
46
|
|
|
* - expires_at string when the blacklist entry will expire (this may be in the past) |
|
47
|
|
|
* - expired boolean whether the blacklist entry has expired |
|
48
|
|
|
* - sender struct the sender that this blacklist entry applies to, or null if none. |
|
49
|
|
|
* - address string the sender's email address |
|
50
|
|
|
* - created_at string the date and time that the sender was first seen by Mandrill as a UTC date string in YYYY-MM-DD HH:MM:SS format |
|
51
|
|
|
* - sent integer the total number of messages sent by this sender |
|
52
|
|
|
* - hard_bounces integer the total number of hard bounces by messages by this sender |
|
53
|
|
|
* - soft_bounces integer the total number of soft bounces by messages by this sender |
|
54
|
|
|
* - rejects integer the total number of rejected messages by this sender |
|
55
|
|
|
* - complaints integer the total number of spam complaints received for messages by this sender |
|
56
|
|
|
* - unsubs integer the total number of unsubscribe requests received for messages by this sender |
|
57
|
|
|
* - opens integer the total number of times messages by this sender have been opened |
|
58
|
|
|
* - clicks integer the total number of times tracked URLs in messages by this sender have been clicked |
|
59
|
|
|
* - unique_opens integer the number of unique opens for emails sent for this sender |
|
60
|
|
|
* - unique_clicks integer the number of unique clicks for emails sent for this sender |
|
61
|
|
|
* - subaccount string the subaccount that this blacklist entry applies to, or null if none. |
|
62
|
|
|
*/ |
|
63
|
|
|
public function getList($email = null, $include_expired = false, $subaccount = null) |
|
64
|
|
|
{ |
|
65
|
|
|
$_params = array("email" => $email, "include_expired" => $include_expired, "subaccount" => $subaccount); |
|
66
|
|
|
return $this->master->call('rejects/list', $_params); |
|
67
|
|
|
} |
|
68
|
|
|
|
|
69
|
|
|
/** |
|
70
|
|
|
* Deletes an email rejection. There is no limit to how many rejections |
|
71
|
|
|
you can remove from your blacklist, but keep in mind that each deletion |
|
72
|
|
|
has an affect on your reputation. |
|
73
|
|
|
* @param string $email an email address |
|
74
|
|
|
* @param string $subaccount an optional unique identifier for the subaccount to limit the blacklist deletion |
|
75
|
|
|
* @return struct a status object containing the address and whether the deletion succeeded. |
|
76
|
|
|
* - email string the email address that was removed from the blacklist |
|
77
|
|
|
* - deleted boolean whether the address was deleted successfully. |
|
78
|
|
|
* - subaccount string the subaccount blacklist that the address was removed from, if any |
|
79
|
|
|
*/ |
|
80
|
|
|
public function delete($email, $subaccount = null) |
|
81
|
|
|
{ |
|
82
|
|
|
$_params = array("email" => $email, "subaccount" => $subaccount); |
|
83
|
|
|
return $this->master->call('rejects/delete', $_params); |
|
84
|
|
|
} |
|
85
|
|
|
} |
|
86
|
|
|
|
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths