Maisystem module not saving my custom class on production server I have an issue with Mailsystem. 
I want to use the Mailjet module to send my emails, and the HTMLmail module to format them.
I did it on my development server and it worked fine. I did the following : 
On Mailjet administration page : admin/config/system/mailsystem
New class :
Class to use for the format() method >> Htmlmail
Class to use for the mail() method >> MailjetSmtpMailSystem
Then i saved the configuration, and in "Site-wde default MailSystemInterface", the new class showed up : HTMLMailSystem__MailjetSmtpMailSystem.

Then i tried to do it on my production server. It doesn't work. When i try to create a new class and hit "save" the new class is not saved.
I found the following error in my logs : 
The specified file temporary://files5RLHj could not be copied to sites/default/files/mailsystem/HTMLMailSystem__MailjetSmtpMailSystem.mail.inc.

So of course i checked the rights.
I do have all the rights on the files folder and on the mailsystem folder.
I also have the rights on the tmp folder.

I checked with my ISP and he said he tried everything too and doesn't know what he can do.

I tried to copy manually the temporary file to its destination, but Mailsystem doesn't seem to realize it's there.

Please, tell me you have an idea where this problem comes from.

Thank you
http://php.net/manual/en/features.safe-mode.php
notes


  This feature has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 5.4.0.


So in general it is not very useful feature and turns out to be causing issues with some applications when they try to write to the file system.