0

https://swiftmailer.symfony.com/docs/introduction.html Documents are lacking some information, like all symfony documents are but my problem at moment is that how to instantiate the new Swift_SmtpTransport()?

I cannot find namespace for it. If i do like the document says, i get this error -> Attempted to load class "Swift_SmtpTransport" from namespace App\Controller.

plus, documents don't say how to instantiate Swift_Message class either. Trying container hasn't worked for me, like so -> $this->container->get

bujashaka
  • 11
  • 4

1 Answers1

0

I think the answer is here if you want to send a message -> Attempted to call an undefined method named "newInstance" of class "Swift_Message" I quote :
Now it is:
$message = \Swift_Message::newInstance()->setSubject('Hello Email') instead of

$message = \Swift_Message::newInstance()
   ->setSubject('Hello Email')
LaurieTV
  • 13
  • 2