I recently installed a fresh install of linux with a LAMP stack (w/php8). I installed composer2. I created an advanced-app using the instructions provided on the Yii site. Ran init file (production). Made the DB, etc. So basically, a clean/default install of everything.
When I try to "Sign Up" in the frontend, the DB table gets the record, but the email isn't saved into the runtime/mail folder. Actually NO 'mail' folder is created. I even tried to add it manually, no luck.
The common/config/main-local.php:
'mailer' => [
'class' => \yii\symfonymailer\Mailer::class,
'viewPath' => '@common/mail',
]
Everything I see, says that saving to a file is the default and this should work.
Do I need to add. 'useFileTransport' => true,
or should it be working?
I'm thinking "maybe" a permissions problem. App was created from terminal with root access. I have chown to wwwrun:www, but still no luck.
Default value of yii\mail\BaseMailer::$useFileTransport
property is false
. It won't save the mail to file unless it's set to true
in your configuration.