symfony - Symfony2 - send email Warning: mkdir(): No such file or directory in -


after configuration smtp in prameters.yml trying send email have type of warning:

contexterrorexception: warning: mkdir(): no such file or directory in /home/crashend/domains/tombax.com/public_html/gbuy/vendor/swiftmailer/swiftmailer/lib/classes/swift/keycache/diskkeycache.php line 273

on localhost worked fine problem appeared after transfer project server. emails not deliver.

code controller send emails:

$message = \swift_message::newinstance()             ->setsubject('hello email')             ->setfrom(array('exapmle@abc.net' => 'tom'))             ->setto(array('exapmle2@abc.net' => 'jan'))             ->setbody('abcd')     ;     $this->get('mailer')->send($message); 

code parameters.yml:

mailer_transport: smtp mailer_host: smtp.myserver.com mailer_user: exapmle@abc.net mailer_password: pass 

please help.

after comment this:

if (is_writable($tmpdir = sys_get_temp_dir())) {         $preferences->settempdir($tmpdir)->setcachetype('disk'); } 

in /vendor/swiftmailer/swiftmailer/lib/preferences.php works fine. think problem in permission directory. swiftmailer uses sys_get_temp_dir() function trying refer /tmp directory.


Comments

Popular posts from this blog

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -