@@ -83,27 +83,31 @@ public function getRecipients(): array
83
83
}
84
84
85
85
/**
86
- * Returns true if any address' localpart contains at least one
87
- * non-ASCII character, and false if all addresses have all-ASCII
88
- * localparts.
89
- *
90
- * This helps to decide whether to the SMTPUTF8 extensions (RFC
91
- * 6530 and following) for any given message.
92
- *
93
- * The SMTPUTF8 extension is strictly required if any address
94
- * contains a non-ASCII character in its localpart. If non-ASCII
95
- * is only used in domains (e.g. horst@freiherr-von-mühlhausen.de)
96
- * then it is possible to to send the message using IDN encoding
97
- * instead of SMTPUTF8. The most common software will display the
98
- * message as intended.
99
- */
86
+ * Returns true if any address' localpart contains at least one
87
+ * non-ASCII character, and false if all addresses have all-ASCII
88
+ * localparts.
89
+ *
90
+ * This helps to decide whether to the SMTPUTF8 extensions (RFC
91
+ * 6530 and following) for any given message.
92
+ *
93
+ * The SMTPUTF8 extension is strictly required if any address
94
+ * contains a non-ASCII character in its localpart. If non-ASCII
95
+ * is only used in domains (e.g. horst@freiherr-von-mühlhausen.de)
96
+ * then it is possible to to send the message using IDN encoding
97
+ * instead of SMTPUTF8. The most common software will display the
98
+ * message as intended.
99
+ */
100
100
public function anyAddressHasUnicodeLocalpart (): bool
101
101
{
102
- if ($ this ->getSender ()->hasUnicodeLocalpart ())
102
+ if ($ this ->getSender ()->hasUnicodeLocalpart ()) {
103
103
return true ;
104
- foreach ($ this ->getRecipients () as $ r )
105
- if ($ r ->hasUnicodeLocalpart ())
104
+ }
105
+ foreach ($ this ->getRecipients () as $ r ) {
106
+ if ($ r ->hasUnicodeLocalpart ()) {
106
107
return true ;
108
+ }
109
+ }
110
+
107
111
return false ;
108
112
}
109
113
}
0 commit comments