{"id":1237,"date":"2022-04-14T21:22:07","date_gmt":"2022-04-15T02:22:07","guid":{"rendered":"http:\/\/xfloyd.net\/blog\/?p=1237"},"modified":"2022-04-14T21:30:14","modified_gmt":"2022-04-15T02:30:14","slug":"symfony-3-adding-swiftmailer-mailgun-bundle-on-plesk","status":"publish","type":"post","link":"https:\/\/xfloyd.net\/blog\/?p=1237","title":{"rendered":"Symfony 3 adding &#8220;swiftmailer-mailgun-bundle&#8221; on PLESK"},"content":{"rendered":"\n<p>Just 4 bundles to make this work<\/p>\n\n\n\n<pre>\/opt\/plesk\/php\/7.3\/bin\/php -d memory_limit=-1 \/usr\/lib\/plesk-9.0\/composer.phar require nyholm\/psr7\n\/opt\/plesk\/php\/7.3\/bin\/php -d memory_limit=-1 \/usr\/lib\/plesk-9.0\/composer.phar require kriswallsmith\/buzz\n\/opt\/plesk\/php\/7.3\/bin\/php -d memory_limit=-1 \/usr\/lib\/plesk-9.0\/composer.phar require cspoo\/swiftmailer-mailgun-bundle\n\/opt\/plesk\/php\/7.3\/bin\/php -d memory_limit=-1 \/usr\/lib\/plesk-9.0\/composer.phar require mailgun\/mailgun-php\n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Configuration<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/tehplague\/swiftmailer-mailgun-bundle#symfony-34\"><\/a>Symfony 3.4<\/h3>\n\n\n\n<p>Also add to your AppKernel:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">new cspoo\\Swiftmailer\\MailgunBundle\\cspooSwiftmailerMailgunBundle(),<\/pre>\n\n\n\n<p>Configure your application with the credentials you find on the&nbsp;<a href=\"https:\/\/mailgun.com\/app\/domains\">domain overview<\/a>&nbsp;on the Mailgun.com dashboard.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\/\/ app\/config\/config.yml:\ncspoo_swiftmailer_mailgun:\n    key: \"key-xxxxxxxxxx\"\n    domain: \"mydomain.com\"\n    endpoint: \"https:\/\/api.eu.mailgun.net\" # Optional. Use this config for EU region. Defaults to \"https:\/\/api.mailgun.net\"\n    http_client: \"httplug.client\" # Optional. Defaults to null and uses discovery to find client. \n\n# Swiftmailer Configuration\nswiftmailer:\n    transport: \"mailgun\"\n    spool:     { type: memory } # This will start sending emails on kernel.terminate event\n<\/pre>\n\n\n\n<p>Note that the swiftmailer configuration is the same as the standard one &#8211; you just change the mailer_transport parameter.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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&nbsp;domain overview&nbsp;on the Mailgun.com dashboard. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[],"_links":{"self":[{"href":"https:\/\/xfloyd.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1237"}],"collection":[{"href":"https:\/\/xfloyd.net\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xfloyd.net\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xfloyd.net\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/xfloyd.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1237"}],"version-history":[{"count":5,"href":"https:\/\/xfloyd.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1237\/revisions"}],"predecessor-version":[{"id":1243,"href":"https:\/\/xfloyd.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1237\/revisions\/1243"}],"wp:attachment":[{"href":"https:\/\/xfloyd.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1237"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xfloyd.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1237"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xfloyd.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1237"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}