Welcome Guest, Not a member yet? Register   Sign In
Proper Mail Support
#4

You can use Symfony Mailer with CI4 now.

Code:
composer require symfony/mailer

PHP Code:
use Symfony\Component\Mailer\Transport;
use 
Symfony\Component\Mailer\Mailer;

$transport Transport::fromDsn('smtp://localhost');
$mailer = new Mailer($transport);

$email = (new Email())
    ->from('[email protected]')
    ->to('[email protected]')
    //->cc('[email protected]')
    //->bcc('[email protected]')
    //->replyTo('[email protected]')
    //->priority(Email::PRIORITY_HIGH)
    ->subject('Time for Symfony Mailer!')
    ->text('Sending emails is fun again!')
    ->html('<p>See Twig integration for better HTML integration!</p>');

$mailer->send($email); 

What do you need?
Reply


Messages In This Thread
Proper Mail Support - by MrWhite - 02-03-2022, 11:56 PM
RE: Proper Mail Support - by InsiteFX - 02-04-2022, 01:21 AM
RE: Proper Mail Support - by MrWhite - 02-04-2022, 03:11 AM
RE: Proper Mail Support - by kenjis - 02-04-2022, 04:30 PM
RE: Proper Mail Support - by MrWhite - 02-04-2022, 06:50 PM
RE: Proper Mail Support - by kenjis - 02-04-2022, 07:41 PM
RE: Proper Mail Support - by MrWhite - 02-04-2022, 09:04 PM
RE: Proper Mail Support - by kilishan - 02-05-2022, 08:36 PM
RE: Proper Mail Support - by InsiteFX - 02-06-2022, 01:05 AM
RE: Proper Mail Support - by MGatner - 02-06-2022, 05:39 AM



Theme © iAndrew 2016 - Forum software by © MyBB