We have a roundcube instance on our ubuntu server.
Since yesterday, we are not able to send emails anymore. After hitting the send-button in roundcube, the "Nachricht wird gesendet..."-Message (E-Mail is being sent) loads endlessly.
After searching the logs, I found the error message:
[30-Jun-2015 10:33:50 UTC] PHP Warning: Missing argument 1 for Mail_mimePart::Mail_mimePart(), called in [***]/roundcube/vendor/pear/mail_mime/Mail/mime.php on line 1288 and defined in [***]/roundcube/vendor/pear/mail_mime-decode/Mail/mimePart.php on line 127
[30-Jun-2015 10:33:50 UTC] PHP Fatal error: Call to undefined method Mail_mimePart::encodeHeader() in [***]/roundcube/vendor/pear/mail_mime/Mail/mime.php on line 1289
It it still possible to sent E-Mails directly via SMTP / Dovecot, so everything should be fine on this side.
My first thought was to install the pear packages, but they seem to be correctly installed inside roundcube.
Stacktrace is:
[30-Jun-2015 11:52:26 UTC] Backtrace from warning 'Missing argument 1 for Mail_mimePart::Mail_mimePart(),
called in [...]/roundcube/vendor/pear/mail_mime/Mail/mime.php on line 1334 and
defined' at [...]/roundcube/vendor/pear/mail_mime-decode/Mail/mimePart.php 127: [...]/roundcube/index.php 290 calling include_once() |
[...]/roundcube/program/steps/mail/sendmail.inc 509 calling headers() |
[...]/roundcube/vendor/pear/mail_mime/Mail/mime.php 1101 calling encodeHeaders() |
[...]/roundcube/vendor/pear/mail_mime/Mail/mime.php 1314 calling encodeHeader() |
[...]/roundcube/vendor/pear/mail_mime/Mail/mime.php 1334 calling Mail_mimePart()
[30-Jun-2015 11:52:26 UTC] PHP Fatal error: Call to undefined method Mail_mimePart::encodeHeader() in [...]roundcube/vendor/pear/mail_mime/Mail/mime.php on line 1335
Notes:
I just completely reinstalled roudcube (User data was either in MySQL or Dovecot, so no data loss).
It was a similar problem as @Alex Chorry already pointed out in the comments. It was caused by composer updating the mail_mime package while installing a plugin (in my case it was globaladdressbook, but I've seen this problem also on other plugin). Also reverting the php wasn't working, as it resulted in a plugin error.
So to solve this problem, I completely ignored composer, and never installed it. I manually installed all the plugins as pointed out her on github:
- Place this plugin folder into plugins directory of Roundcube
- Add globaladdressbook to $config['plugins'] in your Roundcube config