File tree Expand file tree Collapse file tree 2 files changed +2
-12
lines changed Expand file tree Collapse file tree 2 files changed +2
-12
lines changed Original file line number Diff line number Diff line change @@ -31,13 +31,8 @@ final class DelayedSmtpEnvelope extends SmtpEnvelope
31
31
private $ recipientsSet = false ;
32
32
private $ message ;
33
33
34
- public function __construct (RawMessage $ message )
34
+ public function __construct (Message $ message )
35
35
{
36
- if (!$ message instanceof Message) {
37
- // FIXME: parse the raw message to create the envelope?
38
- throw new InvalidArgumentException (sprintf ('Unable to create an SmtpEnvelope from a "%s" message. ' , RawMessage::class));
39
- }
40
-
41
36
$ this ->message = $ message ;
42
37
}
43
38
Original file line number Diff line number Diff line change @@ -28,17 +28,12 @@ final class MessageConverter
28
28
/**
29
29
* @throws RuntimeException when unable to convert the message to an email
30
30
*/
31
- public static function toEmail (RawMessage $ message ): Email
31
+ public static function toEmail (Message $ message ): Email
32
32
{
33
33
if ($ message instanceof Email) {
34
34
return $ message ;
35
35
}
36
36
37
- if (RawMessage::class === \get_class ($ message )) {
38
- // FIXME: parse the raw message to create the envelope?
39
- throw new RuntimeException (sprintf ('Unable to create an Email from an instance of "%s" as it is not supported yet. ' , RawMessage::class));
40
- }
41
-
42
37
// try to convert to a "simple" Email instance
43
38
$ body = $ message ->getBody ();
44
39
if ($ body instanceof TextPart) {
You can’t perform that action at this time.
0 commit comments