Repository navigation
[Bug]: Custom theming logo embedded as application/octet-stream breaks email delivery after upgrade to 34.0.4 #64308
Description
⚠️ This issue respects the following points: ⚠️
- This is not a troubleshooting question, general support matter, or webserver/proxy problem, but likely a bug (if unsure, ask the Community Help Forum).
- This issue is not already reported on Github OR solved at the Community Help Forum (I've searched!).
- I'm using a maintained major version of Nextcloud Server and tested against the latest patch level. (Supported major versions and current patch levels).
- I agree to follow Nextcloud's Code of Conduct.
- I've tried my best to provide clear reproduction steps that someone unfamiliar with this bug could use to reproduce it.
Bug description
After upgrading to Nextcloud 34.0.4, sending emails fails when a custom theming logo is configured.
The SMTP server rejects the message because an inline MIME part is sent as application/octet-stream, although the configured custom logo is a PNG and Nextcloud correctly stores its MIME type as image/png.
With Scaleway Transactional Email, the SMTP response is:
501 5.6.0 'application/octet-stream' is not allowed.
The issue can be isolated to the custom logo: switching back to the default Nextcloud logo immediately makes email delivery work again.
The problem appears to be related to the inline logo embedding introduced in 34.0.4. Reverting only this behavior in lib/private/Mail/EMailTemplate.php to reference the custom logo by its absolute URL restores email delivery while keeping the custom logo enabled.
Steps to reproduce
-
Install or upgrade to Nextcloud Server 34.0.4.
-
Configure a custom PNG logo under Administration settings → Theming.
-
Configure SMTP using a server that rejects
application/octet-streamMIME parts (in this case Scaleway Transactional Email). -
Verify that Nextcloud has stored the correct MIME type for the custom logo:
sudo -u www-data php occ config:app:get theming logoMime
Output:
image/png -
Send a test email from Administration settings → Basic settings.
-
Observe that sending fails with the SMTP response:
501 5.6.0 'application/octet-stream' is not allowed.
-
Switch the theming logo back to the default Nextcloud logo.
-
Send another test email using the unchanged SMTP configuration.
-
Observe that the email is now sent successfully.
Expected behavior
Emails should be sent successfully when a custom theming logo is configured.
When the custom logo is embedded into the email, Nextcloud should use the MIME type stored for the logo (image/png in this case) instead of application/octet-stream.
Nextcloud Server version
34
Operating system
Debian/Ubuntu
PHP engine version
PHP 8.3
Web server
Apache (supported)
Database engine version
MariaDB
Is this bug present after an update or on a fresh install?
Updated from a MINOR version (ex. 32.0.1 to 32.0.2)
Are you using the Nextcloud Server Encryption module?
None
What user-backends are you using?
- Default user-backend (database)
- LDAP/ Active Directory
- SSO - SAML
- Other
Configuration report
root@debekom-Standard-PC-Q35-ICH9-2009:/var/www/nextcloud# sudo -u www-data php occ config:list system
{
"system": {
"instanceid": "***REMOVED SENSITIVE VALUE***",
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"nextcloud.debekom.lt",
"drive.debekom.lt"
],
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"check_data_directory_permissions": false,
"dbtype": "mysql",
"version": "34.0.4.1",
"trusted_proxies": "***REMOVED SENSITIVE VALUE***",
"forwarded_for_headers": [
"HTTP_X_FORWARDED_FOR"
],
"overwriteprotocol": "https",
"overwrite.cli.url": "https:\/\/nextcloud.debekom.lt",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbtableprefix": "oc_",
"mysql.utf8mb4": true,
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"objectstore": {
"class": "\\OC\\Files\\ObjectStore\\S3",
"arguments": {
"bucket": "debekom-nextcloud-storage",
"hostname": "s3.pl-waw.scw.cloud",
"port": 443,
"use_ssl": true,
"region": "pl-waw",
"key": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"use_path_style": true,
"uploadPartSize": 104857600
}
},
"memcache.local": "\\OC\\Memcache\\Redis",
"redis": {
"host": "***REMOVED SENSITIVE VALUE***",
"port": 6379
},
"installed": true,
"maintenance": false,
"config_preset": 6,
"mail_smtpmode": "smtp",
"mail_sendmailmode": "smtp",
"mail_smtphost": "***REMOVED SENSITIVE VALUE***",
"mail_from_address": "***REMOVED SENSITIVE VALUE***",
"mail_domain": "***REMOVED SENSITIVE VALUE***",
"mail_smtpport": "2465",
"mail_smtpauth": true,
"mail_smtpname": "***REMOVED SENSITIVE VALUE***",
"mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
"mail_smtpsecure": "ssl",
"theme": "",
"loglevel": 2,
"memcache.locking": "\\OC\\Memcache\\Redis",
"maintenance_window_start": 1,
"shareapi_allow_share_dialog_user_enumeration": false,
"shareapi_only_share_with_group_members": true,
"default_phone_region": "LT",
"mail_smtpstreamoptions": {
"ssl": {
"allow_self_signed": false,
"verify_peer": true,
"verify_peer_name": true
}
}
}
}List of activated Apps
root@debekom-Standard-PC-Q35-ICH9-2009:/var/www/nextcloud# sudo -u www-data php occ app:list
Enabled:
- activity: 7.0.0
- appstore: 1.0.0
- bruteforcesettings: 7.0.0
- calendar: 6.5.4
- circles: 34.0.0
- cloud_federation_api: 1.18.0
- comments: 1.24.0
- contacts: 8.8.1
- contactsinteraction: 1.15.0
- dashboard: 7.14.0
- dav: 1.40.0
- external: 9.0.1
- federatedfilesharing: 1.24.0
- federation: 1.24.0
- files: 2.6.0
- files_downloadlimit: 5.2.0
- files_external: 1.26.0
- files_lock: 34.0.1
- files_pdfviewer: 7.0.0
- files_reminders: 1.7.0
- files_sharing: 1.26.0
- files_trashbin: 1.24.0
- files_versions: 1.27.0
- firstrunwizard: 7.0.0-dev.0
- logreader: 7.0.0
- lookup_server_connector: 1.22.0
- mail: 5.11.5
- nextcloud_announcements: 6.0.0
- notes: 6.0.2
- notifications: 7.0.0-dev.1
- notify_push: 1.4.0
- oauth2: 1.22.0
- office: 1.0.0
- password_policy: 6.0.0-dev.0
- photos: 7.0.0
- privacy: 6.0.0-dev.1
- profile: 1.3.0
- provisioning_api: 1.24.0
- recommendations: 7.0.0
- related_resources: 5.0.0-dev.0
- serverinfo: 6.0.0
- settings: 1.17.0
- sharebymail: 1.24.0
- spreed: 24.0.5
- support: 6.0.0
- survey_client: 6.0.0-dev.0
- systemtags: 1.24.0
- text: 8.0.0
- theming: 2.9.0
- twofactor_backupcodes: 1.23.0
- twofactor_totp: 16.0.0
- updatenotification: 1.24.0
- viewer: 7.0.0-dev.0
- weather_status: 1.14.0
- webhook_listeners: 1.6.0
- workflowengine: 2.16.0
Disabled:
- admin_audit: 1.24.0
- app_api: 34.0.0 (installed 32.0.0)
- encryption: 2.22.0
- suspicious_login: 12.0.0-dev.0
- twofactor_nextcloud_notification: 8.0.0
- user_ldap: 1.25.0
- user_status: 1.14.0 (installed 1.12.0)Nextcloud Signing status
No errors have been found.Nextcloud Logs
{"reqId":"sz8sW5Cd2wsoRkzHQoYO","level":3,"time":"2026-09-14T11:08:25+00:00","remoteAddr":"151.115.72.71","user":"admin","app":"settings","method":"POST","url":"/index.php/settings/admin/mailtest","scriptName":"/index.php","message":"Failed sending test email: E-Mail konnte nicht versandt werden. Prüfen Sie Ihr E-Mail-Serverprotokoll","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36","version":"34.0.4.1","exception":{"Exception":"RuntimeException","Message":"E-Mail konnte nicht versandt werden. Prüfen Sie Ihr E-Mail-Serverprotokoll","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":165,"function":"sendTestMail","class":"OCA\\Settings\\Controller\\MailSettingsController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":78,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":137,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":324,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1172,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":25,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/apps/settings/lib/Controller/MailSettingsController.php","Line":148,"message":"Failed sending test email: E-Mail konnte nicht versandt werden. Prüfen Sie Ihr E-Mail-Serverprotokoll","exception":"{\"class\":\"RuntimeException\",\"message\":\"E-Mail konnte nicht versandt werden. Prüfen Sie Ihr E-Mail-Serverprotokoll\",\"code\":0,\"file\":\"/var/www/nextcloud/apps/settings/lib/Controller/MailSettingsController.php:148\",\"trace\":\"#0 /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(165): OCA\\Settings\\Controller\\MailSettingsController->sendTestMail()\\n#1 /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(78): OC\\AppFramework\\Http\\Dispatcher->executeController()\\n#2 /var/www/nextcloud/lib/private/AppFramework/App.php(137): OC\\AppFramework\\Http\\Dispatcher->dispatch()\\n#3 /var/www/nextcloud/lib/private/Route/Router.php(324): OC\\AppFramework\\App::main()\\n#4 /var/www/nextcloud/lib/base.php(1172): OC\\Route\\Router->match()\\n#5 /var/www/nextcloud/index.php(25): OC::handleRequest()\\n#6 {main}\"}","CustomMessage":"Failed sending test email: E-Mail konnte nicht versandt werden. Prüfen Sie Ihr E-Mail-Serverprotokoll"},"id":"6aa7de78b1c10"}
{"reqId":"ry9tQPyXfMdEkbULCzrj","level":3,"time":"2026-09-14T11:12:18+00:00","remoteAddr":"151.115.72.71","user":"admin","app":"core","method":"POST","url":"/ocs/v2.php/cloud/users/Gerrit/welcome","scriptName":"/ocs/v2.php","message":"Sending mail to \"Array\n(\n [gerrit.langel@inbox.lt] => Gerrit Langel\n)\n\" with subject \"Dein Debekom Drive-Konto wurde erstellt\" failed","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36","version":"34.0.4.1","exception":{"Exception":"Symfony\\Component\\Mailer\\Exception\\UnexpectedResponseException","Message":"Expected response code \"250\" but got code \"501\", with message \"501 5.6.0 'application/octet-stream' is not allowed. Please refer to https://mimetypes.tem.scaleway.com for explicit MIME types list.\".","Code":501,"Trace":[{"file":"/var/www/nextcloud/3rdparty/symfony/mailer/Transport/Smtp/SmtpTransport.php","line":186,"function":"assertResponseCode","class":"Symfony\\Component\\Mailer\\Transport\\Smtp\\SmtpTransport","type":"->"},{"file":"/var/www/nextcloud/3rdparty/symfony/mailer/Transport/Smtp/EsmtpTransport.php","line":118,"function":"executeCommand","class":"Symfony\\Component\\Mailer\\Transport\\Smtp\\SmtpTransport","type":"->"},{"file":"/var/www/nextcloud/3rdparty/symfony/mailer/Transport/Smtp/SmtpTransport.php","line":222,"function":"executeCommand","class":"Symfony\\Component\\Mailer\\Transport\\Smtp\\EsmtpTransport","type":"->"},{"file":"/var/www/nextcloud/3rdparty/symfony/mailer/Transport/AbstractTransport.php","line":69,"function":"doSend","class":"Symfony\\Component\\Mailer\\Transport\\Smtp\\SmtpTransport","type":"->"},{"file":"/var/www/nextcloud/3rdparty/symfony/mailer/Transport/Smtp/SmtpTransport.php","line":137,"function":"send","class":"Symfony\\Component\\Mailer\\Transport\\AbstractTransport","type":"->"},{"file":"/var/www/nextcloud/3rdparty/symfony/mailer/Mailer.php","line":42,"function":"send","class":"Symfony\\Component\\Mailer\\Transport\\Smtp\\SmtpTransport","type":"->"},{"file":"/var/www/nextcloud/lib/private/Mail/Mailer.php","line":212,"function":"send","class":"Symfony\\Component\\Mailer\\Mailer","type":"->"},{"file":"/var/www/nextcloud/apps/settings/lib/Mailer/NewUserMailHelper.php","line":137,"function":"send","class":"OC\\Mail\\Mailer","type":"->"},{"file":"/var/www/nextcloud/apps/provisioning_api/lib/Controller/UsersController.php","line":2053,"function":"sendMail","class":"OCA\\Settings\\Mailer\\NewUserMailHelper","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":165,"function":"resendWelcomeMessage","class":"OCA\\Provisioning_API\\Controller\\UsersController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":78,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":137,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":324,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/ocs/v1.php","line":78,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/ocs/v2.php","line":10,"args":["/var/www/nextcloud/ocs/v1.php"],"function":"require_once"}],"File":"/var/www/nextcloud/3rdparty/symfony/mailer/Transport/Smtp/SmtpTransport.php","Line":327,"message":"Sending mail to \"Array\n(\n [gerrit.langel@inbox.lt] => Gerrit Langel\n)\n\" with subject \"Dein Debekom Drive-Konto wurde erstellt\" failed","exception":"{\"class\":\"Symfony\\Component\\Mailer\\Exception\\UnexpectedResponseException\",\"message\":\"Expected response code \\\"250\\\" but got code \\\"501\\\", with message \\\"501 5.6.0 'application/octet-stream' is not allowed. Please refer to https://mimetypes.tem.scaleway.com for explicit MIME types list.\\\".\",\"code\":501,\"file\":\"/var/www/nextcloud/3rdparty/symfony/mailer/Transport/Smtp/SmtpTransport.php:327\",\"trace\":\"#0 /var/www/nextcloud/3rdparty/symfony/mailer/Transport/Smtp/SmtpTransport.php(186): Symfony\\Component\\Mailer\\Transport\\Smtp\\SmtpTransport->assertResponseCode()\\n#1 /var/www/nextcloud/3rdparty/symfony/mailer/Transport/Smtp/EsmtpTransport.php(118): Symfony\\Component\\Mailer\\Transport\\Smtp\\SmtpTransport->executeCommand()\\n#2 /var/www/nextcloud/3rdparty/symfony/mailer/Transport/Smtp/SmtpTransport.php(222): Symfony\\Component\\Mailer\\Transport\\Smtp\\EsmtpTransport->executeCommand()\\n#3 /var/www/nextcloud/3rdparty/symfony/mailer/Transport/AbstractTransport.php(69): Symfony\\Component\\Mailer\\Transport\\Smtp\\SmtpTransport->doSend()\\n#4 /var/www/nextcloud/3rdparty/symfony/mailer/Transport/Smtp/SmtpTransport.php(137): Symfony\\Component\\Mailer\\Transport\\AbstractTransport->send()\\n#5 /var/www/nextcloud/3rdparty/symfony/mailer/Mailer.php(42): Symfony\\Component\\Mailer\\Transport\\Smtp\\SmtpTransport->send()\\n#6 /var/www/nextcloud/lib/private/Mail/Mailer.php(212): Symfony\\Component\\Mailer\\Mailer->send()\\n#7 /var/www/nextcloud/apps/settings/lib/Mailer/NewUserMailHelper.php(137): OC\\Mail\\Mailer->send()\\n#8 /var/www/nextcloud/apps/provisioning_api/lib/Controller/UsersController.php(2053): OCA\\Settings\\Mailer\\NewUserMailHelper->sendMail()\\n#9 /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(165): OCA\\Provisioning_API\\Controller\\UsersController->resendWelcomeMessage()\\n#10 /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(78): OC\\AppFramework\\Http\\Dispatcher->executeController()\\n#11 /var/www/nextcloud/lib/private/AppFramework/App.php(137): OC\\AppFramework\\Http\\Dispatcher->dispatch()\\n#12 /var/www/nextcloud/lib/private/Route/Router.php(324): OC\\AppFramework\\App::main()\\n#13 /var/www/nextcloud/ocs/v1.php(78): OC\\Route\\Router->match()\\n#14 /var/www/nextcloud/ocs/v2.php(10): require_once('...')\\n#15 {main}\"}","CustomMessage":"Sending mail to \"Array\n(\n [gerrit.langel@inbox.lt] => Gerrit Langel\n)\n\" with subject \"Dein Debekom Drive-Konto wurde erstellt\" failed"},"id":"6aa7de78b1b61"}Additional info
No response
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
icewind1991 commentedon Sep 14, 2026
Can reproduce
icewind1991 commentedon Sep 14, 2026
Fixed by #64327
fix: use correct mimetype for theming logo
fix: use correct mimetype for theming logo
fix: use correct mimetype for theming logo