4.9.x best pratice to use swift mailer in own extension/plugin
Hello Community,
I am wondering about not existing tutorial for beginners for using contao build in symfony componets. After hours research of code snippets and examples I didn't found the right use - argument for using the swiftmailer classes in my plugin.
PHP-Code:
namespace Vendor\Pluginname\Classes;
use Symfony\Component\SwiftMailer;
class MyClass
{
public function sendMyMessage($myDataArr, \Swift_Mailer $mailer)
{
....
...
..
.
}
}
Any ideas whats the mistake or any other recommendations for working with swiftmailer in contao?
Thanks for posting tips here.