Skip to content

Commit b6a9158

Browse files
Add setTo method to SimpleEmailServiceMessage (#56)
Add setTo method as a shorthand of clearTo->addTo
1 parent 396f33a commit b6a9158

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/SimpleEmailServiceMessage.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,17 @@ public function addTo($to) {
6363

6464
return $this;
6565
}
66+
67+
/**
68+
* @return SimpleEmailServiceMessage $this
69+
*/
70+
public function setTo($to) {
71+
$this->to = (array) $to;
72+
73+
$this->is_clean = false;
74+
75+
return $this;
76+
}
6677

6778
/**
6879
* Clear the To: email address(es) for the message

0 commit comments

Comments
 (0)