Just 4 bundles to make this work
/opt/plesk/php/7.3/bin/php -d memory_limit=-1 /usr/lib/plesk-9.0/composer.phar require nyholm/psr7 /opt/plesk/php/7.3/bin/php -d memory_limit=-1 /usr/lib/plesk-9.0/composer.phar require kriswallsmith/buzz /opt/plesk/php/7.3/bin/php -d memory_limit=-1 /usr/lib/plesk-9.0/composer.phar require cspoo/swiftmailer-mailgun-bundle /opt/plesk/php/7.3/bin/php -d memory_limit=-1 /usr/lib/plesk-9.0/composer.phar require mailgun/mailgun-php
Configuration
Symfony 3.4
Also add to your AppKernel:
new cspoo\Swiftmailer\MailgunBundle\cspooSwiftmailerMailgunBundle(),
Configure your application with the credentials you find on the domain overview on the Mailgun.com dashboard.
// app/config/config.yml:
cspoo_swiftmailer_mailgun:
key: "key-xxxxxxxxxx"
domain: "mydomain.com"
endpoint: "https://api.eu.mailgun.net" # Optional. Use this config for EU region. Defaults to "https://api.mailgun.net"
http_client: "httplug.client" # Optional. Defaults to null and uses discovery to find client.
# Swiftmailer Configuration
swiftmailer:
transport: "mailgun"
spool: { type: memory } # This will start sending emails on kernel.terminate event
Note that the swiftmailer configuration is the same as the standard one – you just change the mailer_transport parameter.