Skip to content
Advertisement

PHP Exception with symfony mailer

I’m a beginner with Symfony, and I have to put a Mailer in my web service. But I have a php exception that I don’t understand.

There is my mailer function :

JavaScript

And there is the error in my log :

JavaScript

EnvVarProcessor.php is a file I never worked with so I don’t understand, like I said I’m a beginner so I might have forgot something.

Thank’s for you’re help.

Advertisement

Answer

You have to set the parameters how your mails should be sent via an environment variable (there are plenty options but there are some common ways).

Most easy one as documented is to update the .env file with:

JavaScript

Comment: EnvVarProcessor.php is just the component to set the env variables in the Symfony container based on the different options one has to set them.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement