### Steps to reproduce
With Nextcloud 13 and "php" as send mode there are no pr…oblems with sending emails.
PHP itself is using sendmail.
Now with Nextcloud 14 "php" isn't available as send mode. So I have to switch to "sendmail" as send mode
Configure "sendmail" as send mode.
Send the test email.
I have located the problem in the file "lib/private/Mail/Mailer.php".
If I change the line (~281):
| return new \Swift_SendmailTransport($binaryPath . ' -bs');
to
| return new \Swift_SendmailTransport($binaryPath . ' -t');
email is working again. Which make sense, because my sendmail binary doesn't support the "-bs" switch. And "-t" is also used by PHP and its mail function.
There should be a configure option for this switch. Right now it's hardcoded. And "-bs" is not working for every sendmail binary.
### Expected behaviour
No error:
Email sent
### Actual behaviour
Error occurs:
A problem occurred while sending the email. Please revise your settings. (Error: Expected response code 220 but got code "", with message "")
## Server configuration detail
**Operating system:** FreeBSD 11.1-STABLE amd64
**Webserver:** Apache (apache2handler)
**Database:** mysql 5.6.41
**PHP version:**
7.1.22
Modules loaded: Core, date, libxml, pcre, Reflection, SPL, hash, session, apache2handler, standard, apcu, bz2, ctype, curl, dom, mbstring, fileinfo, filter, ftp, gd, mysqlnd, iconv, imagick, intl, json, ldap, exif, mysqli, openssl, PDO, posix, SimpleXML, smbclient, xml, xmlwriter, zip, zlib, pdo_mysql, wddx, xmlreader, xsl, libsmbclient, Zend OPcache
**Nextcloud version:** 14.0.0 - 14.0.0.19
**Updated from an older Nextcloud/ownCloud or fresh install:** update from 13.0.6
**Where did you install Nextcloud from:** FreeBSD package
<details><summary>Signing status</summary>
Array
(
)
</details>
<details><summary>List of activated apps</summary>
```
Enabled:
- accessibility: 1.0.1
- activity: 2.7.0
- avpreviewprovider: 0.0.1
- cloud_federation_api: 0.0.1
- comments: 1.4.0
- dav: 1.6.0
- federatedfilesharing: 1.4.0
- federation: 1.4.0
- files: 1.9.0
- files_external: 1.5.0
- files_pdfviewer: 1.3.2
- files_sharing: 1.6.2
- files_texteditor: 2.6.0
- files_trashbin: 1.4.1
- files_versions: 1.7.1
- files_videoplayer: 1.3.0
- firstrunwizard: 2.3.0
- gallery: 18.1.0
- groupfolders: 1.3.3
- issuetemplate: 0.4.0
- logreader: 2.0.0
- lookup_server_connector: 1.2.0
- music: 0.9.2
- nextcloud_announcements: 1.3.0
- notifications: 2.2.1
- oauth2: 1.2.1
- password_policy: 1.4.0
- previewgenerator: 1.1.0
- provisioning_api: 1.4.0
- serverinfo: 1.4.0
- sharebymail: 1.4.0
- support: 1.0.0
- survey_client: 1.2.0
- systemtags: 1.4.0
- theming: 1.5.0
- twofactor_backupcodes: 1.3.1
- updatenotification: 1.4.1
- workflowengine: 1.4.0
Disabled:
- admin_audit
- encryption
- user_external
- user_ldap
```
</details>
<details><summary>Configuration (config/config.php)</summary>
```
{
"instanceid": "***REMOVED SENSITIVE VALUE***",
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"192.168.178.212",
"cloud.wiedmann-online.tk"
],
"trusted_proxies": "***REMOVED SENSITIVE VALUE***",
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"overwritehost": "cloud.wiedmann-online.tk",
"overwriteprotocol": "https",
"overwrite.cli.url": "https:\/\/cloud.wiedmann-online.tk",
"htaccess.RewriteBase": "\/",
"dbtype": "mysql",
"version": "14.0.0.19",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbport": "",
"dbtableprefix": "oc_",
"mysql.utf8mb4": true,
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"installed": true,
"mail_smtpmode": "sendmail",
"mail_domain": "***REMOVED SENSITIVE VALUE***",
"mail_from_address": "***REMOVED SENSITIVE VALUE***",
"logtimezone": "Europe\/Berlin",
"cron_log": true,
"default_language": "de",
"memcache.local": "\\OC\\Memcache\\APCu",
"maintenance": false,
"theme": "",
"loglevel": 1,
"enabledPreviewProviders": [
"OC\\Preview\\PNG",
"OC\\Preview\\JPEG",
"OC\\Preview\\GIF",
"OC\\Preview\\BMP",
"OC\\Preview\\XBitmap",
"OC\\Preview\\TXT",
"OC\\Preview\\MarkDown"
],
"apps_paths": [
{
"path": "\/usr\/local\/www\/nextcloud\/apps",
"url": "\/apps",
"writable": true
},
{
"path": "\/usr\/local\/www\/nextcloud\/apps-pkg",
"url": "\/apps-pkg",
"writable": false
}
]
}
```
</details>
**Are you using external storage, if yes which one:** local
**Are you using encryption:**
**Are you using an external user-backend, if yes which one:**
## Client configuration
**Browser:** Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:62.0) Gecko/20100101 Firefox/62.0
**Operating system:** Windows 10
## Logs
<details><summary>Browser log</summary>
```
```
</details>
<details><summary>Nextcloud log</summary>
```
```
</details>
<details><summary>Browser log</summary>
</details>