Good afternoon, we are looking for a class that can collect raw from various parts of the mail for example

$message->setTo($to); $message->setFrom($from); $message->attach($filename); $raw = $message->getRaw(); 

and on the contrary, from raw extract parameters

 $message->setRaw($raw); $to = $message->getTo(); $from = $message->getFrom(); $attachments = $message->getAttach(); 

    1 answer 1

    In theory, any class to send email on this principle works. $raw acts as an object. Google issued the first two results as follows:

    1. https://myrusakov.ru/php-class-email.html
    2. http://webi.ru/webi_files/php_libmail.html

    From large and popular: swiftmailer and phpmailer .