Man kann das jetzt über Fluid (> 10.3) machen oder MailMessage



use Symfony\Component\Mime\Address;
use TYPO3\CMS\Core\Mail\FluidEmail;
use TYPO3\CMS\Core\Mail\Mailer;

$email = GeneralUtility::makeInstance(FluidEmail::class);
    ->from(new Address('', 'Jeremy'))
    ->subject('TYPO3 loves you - here is why')
    ->format('both') // send HTML and plaintext mail
    ->assign('mySecretIngredient', 'Tomato and TypoScript');




/ Create the message
$mail = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Mail\MailMessage::class);

// Prepare and send the message

   // Defining the "From" email address and name as an object
   // (email clients will display the name)
   ->from(new \Symfony\Component\Mime\Address('', 'John Doe'))

   // Set the "To" addresses
      new \Symfony\Component\Mime\Address('', 'Max Mustermann'),
      new \Symfony\Component\Mime\Address('')

   // Give the message a subject
   ->subject('Your subject')

   // Give it the text message
   ->text('Here is the message itself')

   // And optionally a HTML message
   ->html('<p>Here is the message itself</p>')

   // Optionally add any attachments

   // And finally send it



Mehr Infos: