yesterday I installed Swift Mailer v4b2, today I saw the new version, deleted the old and uploaded the new one instead.
Now when I tried to send the following basic mail:
Code: Select all
$smtp = Swift_SmtpTransport::newInstance('domain.com', 25)
->setUsername('info@domain.com')
->setPassword('pwd');
$mailer = Swift_Mailer::newInstance($smtp);
$message = Swift_Message::newInstance('Test');
$message
->setTo(array(
'test@gmail.com' => 'Test Test'
))
->setFrom(array('test@domain.com' => 'Test Test'))
->setBody(
'Blablabla!',
'text/html'
)
->addPart('Blablabla!', 'text/plain')
;
if ($mailer->send($message))
{
echo "Message sent!";
}
else
{
echo "Message could not be sent.";
}Code: Select all
Warning: mkdir() [function.mkdir]: SAFE MODE Restriction in effect. The script whose uid is 10570 is not allowed to access /tmp owned by uid 0 in swift-mailer/classes/Swift/KeyCache/DiskKeyCache.php on line 281
Fatal error: Uncaught exception 'Swift_IoException' with message 'Failed to create cache directory /tmp/4981d608a8408' in /swift-mailer/classes/Swift/KeyCache/DiskKeyCache.php:283 Stack trace: #0 /swift-mailer/classes/Swift/KeyCache/DiskKeyCache.php(95): Swift_KeyCache_DiskKeyCache->_prepareCache('4981d608a8408') #1 //swift-mailer/classes/Swift/KeyCache/SimpleKeyCacheInputStream.php(73): Swift_KeyCache_DiskKeyCache->setString('4981d608a8408', 'body', 'Message-ID: <12...', 2) #2 swift-mailer/classes/Swift/ByteStream/AbstractFilterableInputStream.php(129): Swift_KeyCache_SimpleKeyCacheInputStream->write('Message-ID: <12...') #3 /swift-mailer/classes/Swift/ByteStream/AbstractFilterableInputS in swift-mailer/classes/Swift/KeyCache/DiskKeyCache.php on line 283I installed it on another domain (on the same webspace), there it runs smoothly without any problem, exactly the same test.
So I guess that I mixed up something trying to upgrade, but what exactly where and: how can I fix it?
Thank you in advance for your help
Greetings
//edit: I don't have access to /tmp/ so I can't delete anything probably laying around there