@@ -113,11 +113,11 @@ |
||
113 | 113 | public function delete($filter) |
114 | 114 | { |
115 | 115 | $criteria = $this->getCriteriaFromFilter($filter); |
116 | - $res = $this->collection->remove($criteria, array(), $this->name); |
|
117 | - if($res === true) |
|
118 | - { |
|
116 | + $res = $this->collection->remove($criteria, array(), $this->name); |
|
117 | + if($res === true) |
|
118 | + { |
|
119 | 119 | return true; |
120 | - } |
|
120 | + } |
|
121 | 121 | if($res === false || $res['err'] !== null) |
122 | 122 | { |
123 | 123 | return false; |
@@ -46,10 +46,13 @@ discard block |
||
46 | 46 | $args = array(); |
47 | 47 | $args['RawMessage'] = array(); |
48 | 48 | $args['RawMessage']['Data'] = $email->getRawMessage(); |
49 | - try { |
|
49 | + try |
|
50 | + { |
|
50 | 51 | $res = $this->ses->sendRawEmail($args); |
51 | 52 | return $res; |
52 | - } catch(\Exception $e) { |
|
53 | + } |
|
54 | + catch(\Exception $e) |
|
55 | + { |
|
53 | 56 | return false; |
54 | 57 | } |
55 | 58 | } |
@@ -66,7 +69,7 @@ discard block |
||
66 | 69 | $args['Message']['Subject']['Data'] = $email->getSubject(); |
67 | 70 | $args['Message']['Body'] = array(); |
68 | 71 | $textBody = $email->getTextBody(); |
69 | - if(strlen($textBody) > 0) |
|
72 | + if(strlen($textBody) > 0) |
|
70 | 73 | { |
71 | 74 | $args['Message']['Body']['Text'] = array(); |
72 | 75 | $args['Message']['Body']['Text']['Data'] = $textBody; |
@@ -74,9 +77,12 @@ discard block |
||
74 | 77 | $args['Message']['Body']['Html'] = array(); |
75 | 78 | $args['Message']['Body']['Html']['Data'] = $email->getHtmlBody(); |
76 | 79 | $args['ReplyToAddresses'] = array($email->getReplyTo()); |
77 | - try { |
|
80 | + try |
|
81 | + { |
|
78 | 82 | return $this->ses->sendEmail($args); |
79 | - } catch(\Exception $e) { |
|
83 | + } |
|
84 | + catch(\Exception $e) |
|
85 | + { |
|
80 | 86 | return false; |
81 | 87 | } |
82 | 88 | } |