Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[9.x] Implement Symfony Mailer #38481

Merged
merged 38 commits into from
Sep 14, 2021
Merged
Show file tree
Hide file tree
Changes from 37 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
f1d160f
Implement Symfony Mailer
driesvints Aug 20, 2021
9b70c70
Apply fixes from StyleCI
taylorotwell Aug 20, 2021
f9f8ad3
Update src/Illuminate/Mail/Message.php
driesvints Aug 21, 2021
b821c61
Update src/Illuminate/Mail/Message.php
driesvints Aug 21, 2021
d480103
Update src/Illuminate/Mail/Message.php
driesvints Aug 21, 2021
4abbc80
Update src/Illuminate/Mail/Message.php
driesvints Aug 21, 2021
e157c93
Update src/Illuminate/Mail/Message.php
driesvints Aug 21, 2021
eddfab4
Update Array and Log transports
driesvints Aug 23, 2021
1f68e4b
Apply fixes from StyleCI
taylorotwell Aug 23, 2021
c744477
Fix interface implementation
driesvints Aug 23, 2021
aa88fa1
Update Mailer
driesvints Aug 23, 2021
f6b10e1
Apply fixes from StyleCI
taylorotwell Aug 23, 2021
fa44414
Rename
driesvints Aug 23, 2021
ecea2e6
Remove method
driesvints Aug 23, 2021
9ef4747
Fix tests
driesvints Aug 23, 2021
0d8450e
Apply fixes from StyleCI
taylorotwell Aug 23, 2021
66ad5fa
Work on Mailer tests
driesvints Aug 24, 2021
c0220cd
type-hint
driesvints Aug 24, 2021
2463633
Fix Mailer tests
driesvints Aug 25, 2021
eb33afd
Fix more tests
driesvints Aug 25, 2021
b5aba0e
Apply fixes from StyleCI
taylorotwell Aug 25, 2021
f35a83c
Migrate Mailgun transport
driesvints Aug 27, 2021
58e7343
Migrate Postmark transport
driesvints Aug 27, 2021
17c7889
Replace SesTransport
driesvints Aug 30, 2021
8e87678
Remove transports from dev dependencies
driesvints Aug 30, 2021
3c1d1dc
Allow setting options on esmtp transport
driesvints Sep 2, 2021
66bbe6a
Fix Postmark transport
driesvints Sep 3, 2021
c2c97da
Fix embedding files
driesvints Sep 3, 2021
8724b1f
Clarify API transports
driesvints Sep 3, 2021
d61b7a9
Apply fixes from StyleCI
taylorotwell Sep 7, 2021
eb24e34
Fix SES transport setup
driesvints Sep 8, 2021
d6fc420
Add MessageStreamId to Postmark Transport again (#38748)
Jubeki Sep 10, 2021
c63ade9
Update symfony mailer docblocks (#38773)
Jubeki Sep 12, 2021
4ec09e5
Merge branch 'master' into symfony-mailer
driesvints Sep 13, 2021
78dccf1
Add Session Token to SES Transport (#38797)
Jubeki Sep 13, 2021
5e1baff
Update src/Illuminate/Mail/Transport/ArrayTransport.php
taylorotwell Sep 13, 2021
e23e57e
fix docblock
taylorotwell Sep 13, 2021
c8d1654
Add Wrapper for Symfony SentMessage (#38803)
Jubeki Sep 14, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@
"psr/container": "^1.1.1|^2.0.1",
"psr/simple-cache": "^1.0",
"ramsey/uuid": "^4.0",
"swiftmailer/swiftmailer": "^6.2.7",
"symfony/console": "^6.0",
"symfony/error-handler": "^6.0",
"symfony/finder": "^6.0",
"symfony/http-foundation": "^6.0",
"symfony/http-kernel": "^6.0",
"symfony/mailer": "^6.0",
"symfony/mime": "^6.0",
"symfony/process": "^6.0",
"symfony/routing": "^6.0",
Expand Down Expand Up @@ -136,12 +136,12 @@
"ext-pcntl": "Required to use all features of the queue worker.",
"ext-posix": "Required to use all features of the queue worker.",
"ext-redis": "Required to use the Redis cache and queue drivers (^4.0|^5.0).",
"aws/aws-sdk-php": "Required to use the SQS queue driver, DynamoDb failed job storage and SES mail driver (^3.189.0).",
"aws/aws-sdk-php": "Required to use the SQS queue driver and DynamoDb failed job storage (^3.189.0).",
"brianium/paratest": "Required to run tests in parallel (^6.0).",
"doctrine/dbal": "Required to rename columns and drop SQLite columns (^2.12|^3.0).",
"filp/whoops": "Required for friendly error pages in development (^2.8).",
"fakerphp/faker": "Required to use the eloquent factory builder (^1.9.1).",
"guzzlehttp/guzzle": "Required to use the HTTP Client, Mailgun mail driver and the ping methods on schedules (^7.2).",
"guzzlehttp/guzzle": "Required to use the HTTP Client and the ping methods on schedules (^7.2).",
"laravel/tinker": "Required to use the tinker console command (^2.0).",
"league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^2.0).",
"league/flysystem-ftp": "Required to use the Flysystem FTP driver (^2.0).",
Expand All @@ -153,10 +153,13 @@
"predis/predis": "Required to use the predis connector (^1.1.2).",
"psr/http-message": "Required to allow Storage::put to accept a StreamInterface (^1.0).",
"pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^5.0|^6.0).",
"symfony/amazon-mailer": "Required to enable support for the SES mail transport (^6.0).",
"symfony/cache": "Required to PSR-6 cache bridge (^6.0).",
"symfony/filesystem": "Required to enable support for relative symbolic links (^6.0).",
"symfony/psr-http-message-bridge": "Required to use PSR-7 bridging features (^2.0).",
"wildbit/swiftmailer-postmark": "Required to use Postmark mail driver (^3.0)."
"symfony/http-client": "Required to enable support for the Symfony API mail transports (^6.0).",
"symfony/mailgun-mailer": "Required to enable support for the Mailgun mail transport (^6.0).",
"symfony/postmark-mailer": "Required to enable support for the Postmark mail transport (^6.0).",
"symfony/psr-http-message-bridge": "Required to use PSR-7 bridging features (^2.0)."
},
"config": {
"sort-packages": true
Expand Down
7 changes: 0 additions & 7 deletions src/Illuminate/Contracts/Mail/Mailer.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,4 @@ public function raw($text, $callback);
* @return void
*/
public function send($view, array $data = [], $callback = null);

/**
* Get the array of failed recipients.
*
* @return array
*/
public function failures();
}
10 changes: 6 additions & 4 deletions src/Illuminate/Mail/Events/MessageSending.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@

namespace Illuminate\Mail\Events;

use Symfony\Component\Mime\Email;

class MessageSending
{
/**
* The Swift message instance.
* The Symfony Email instance.
*
* @var \Swift_Message
* @var \Symfony\Component\Mime\Email
*/
public $message;

Expand All @@ -21,11 +23,11 @@ class MessageSending
/**
* Create a new event instance.
*
* @param \Swift_Message $message
* @param \Symfony\Component\Mime\Email $message
* @param array $data
* @return void
*/
public function __construct($message, $data = [])
public function __construct(Email $message, array $data = [])
{
$this->data = $data;
$this->message = $message;
Expand Down
14 changes: 6 additions & 8 deletions src/Illuminate/Mail/Events/MessageSent.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

namespace Illuminate\Mail\Events;

use Swift_Attachment;
use Symfony\Component\Mime\Email;

class MessageSent
{
/**
* The Swift message instance.
* The Symfony Email instance.
*
* @var \Swift_Message
* @var \Symfony\Component\Mime\Email
*/
public $message;

Expand All @@ -23,11 +23,11 @@ class MessageSent
/**
* Create a new event instance.
*
* @param \Swift_Message $message
* @param \Symfony\Component\Mime\Email $message
* @param array $data
* @return void
*/
public function __construct($message, $data = [])
public function __construct(Email $message, array $data = [])
{
$this->data = $data;
$this->message = $message;
Expand All @@ -40,9 +40,7 @@ public function __construct($message, $data = [])
*/
public function __serialize()
{
$hasAttachments = collect($this->message->getChildren())
->whereInstanceOf(Swift_Attachment::class)
->isNotEmpty();
$hasAttachments = collect($this->message->getAttachments())->isNotEmpty();

return $hasAttachments ? [
'message' => base64_encode(serialize($this->message)),
Expand Down
Loading