Вопрос

Using Swift mailer with Symfony. It works perfectly on windows but on linux there is an error:

Command:

 php app/console swiftmailer:spool:send --env=prod

Error:

 [ErrorException]                                                              
  Warning: mkdir(): No such file or directory in
 /var/www/html/KonnectEz/vendor/swiftmailer/lib/classes/Swift/KeyCache/DiskKeyCache.php line 270

swiftmailer:spool:send [--message-limit[="..."]] [--time-limit[="..."]]
Это было полезно?

Решение

I think SwiftMailer DiskKeyCache is unable to create the cache directory recursively. Please check your SwiftMailer spool directory in config.yml and make sure this path exists.

mkdir() doesn't create directories recursivey by default and DiskKeyCache doesn't force this behaviour.

Maybe the spool directory exists in your windows environment, but not in your linux env?

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top