Question

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[="..."]]
Was it helpful?

Solution

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?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top