@@ -23,9 +23,18 @@ class Message extends MimePart
2323{
2424 /** Priority */
2525 public const
26- HIGH = 1 ,
27- NORMAL = 3 ,
28- LOW = 5 ;
26+ High = 1 ,
27+ Normal = 3 ,
28+ Low = 5 ;
29+
30+ /** @deprecated use Message::High */
31+ public const HIGH = self ::High;
32+
33+ /** @deprecated use Message::Normal */
34+ public const NORMAL = self ::Normal;
35+
36+ /** @deprecated use Message::Low */
37+ public const LOW = self ::Low;
2938
3039 public static array $ defaultHeaders = [
3140 'MIME-Version ' => '1.0 ' ,
@@ -308,7 +317,7 @@ private function createAttachment(
308317
309318 $ part ->setBody ($ content );
310319 $ part ->setContentType ($ contentType );
311- $ part ->setEncoding (preg_match ('#(multipart|message)/#A ' , $ contentType ) ? self ::ENCODING_8BIT : self ::ENCODING_BASE64 );
320+ $ part ->setEncoding (preg_match ('#(multipart|message)/#A ' , $ contentType ) ? self ::Encoding8Bit : self ::EncodingBase64 );
312321 $ part ->setHeader ('Content-Disposition ' , $ disposition . '; filename=" ' . addcslashes ($ file , '" \\' ) . '" ' );
313322 return $ part ;
314323 }
@@ -357,17 +366,17 @@ public function build(): static
357366
358367 $ alt ->setContentType ('text/html ' , 'UTF-8 ' )
359368 ->setEncoding (preg_match ('#[^\n]{990}# ' , $ mail ->htmlBody )
360- ? self ::ENCODING_QUOTED_PRINTABLE
361- : (preg_match ('#[\x80-\xFF]# ' , $ mail ->htmlBody ) ? self ::ENCODING_8BIT : self ::ENCODING_7BIT ))
369+ ? self ::EncodingQuotedPrintable
370+ : (preg_match ('#[\x80-\xFF]# ' , $ mail ->htmlBody ) ? self ::Encoding8Bit : self ::Encoding7Bit ))
362371 ->setBody ($ mail ->htmlBody );
363372 }
364373
365374 $ text = $ mail ->getBody ();
366375 $ mail ->setBody ('' );
367376 $ cursor ->setContentType ('text/plain ' , 'UTF-8 ' )
368377 ->setEncoding (preg_match ('#[^\n]{990}# ' , $ text )
369- ? self ::ENCODING_QUOTED_PRINTABLE
370- : (preg_match ('#[\x80-\xFF]# ' , $ text ) ? self ::ENCODING_8BIT : self ::ENCODING_7BIT ))
378+ ? self ::EncodingQuotedPrintable
379+ : (preg_match ('#[\x80-\xFF]# ' , $ text ) ? self ::Encoding8Bit : self ::Encoding7Bit ))
371380 ->setBody ($ text );
372381
373382 return $ mail ;
0 commit comments