Skip to content

Commit

Permalink
Changes to allow Swiftmailer 5 and 6.
Browse files Browse the repository at this point in the history
  • Loading branch information
thirsch committed Sep 9, 2020
1 parent 2987dcd commit 9c1ef4e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"license": "MIT",
"require": {
"php" : ">=5.3.0",
"swiftmailer/swiftmailer": "~5.2"
"swiftmailer/swiftmailer": "~5.2|^6.0"
},
"require-dev": {
"psr/log": "*"
Expand Down
5 changes: 3 additions & 2 deletions lib/mailer/sfMailer.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,8 @@ public function setDeliveryAddress($address)
*/
public function compose($from = null, $to = null, $subject = null, $body = null)
{
return Swift_Message::newInstance()
$msg = new Swift_Message();
return $msg
->setFrom($from)
->setTo($to)
->setSubject($subject)
Expand Down Expand Up @@ -282,7 +283,7 @@ public function sendNextImmediately()
*
* @return int|false The number of sent emails
*/
public function send(Swift_Mime_Message $message, &$failedRecipients = null)
public function send($message, &$failedRecipients = null)
{
if ($this->force)
{
Expand Down

0 comments on commit 9c1ef4e

Please sign in to comment.