Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Use of the the built in php mailer is no longer supported" but SMTP is used #11107

Closed
tobiasKaminsky opened this issue Sep 7, 2018 · 20 comments
Labels
Milestone

Comments

@tobiasKaminsky
Copy link
Member

tobiasKaminsky commented Sep 7, 2018

  • have smtp used as email
  • upgrade to NC14
  • see "Use of the the built in php mailer is no longer supported"
  • enable encryption (email server connection)
  • disable encryption
  • warning is removed

--> somehow it has an old "state" of mail system

@nextcloud-bot
Copy link
Member

GitMate.io thinks possibly related issues are #11106 (Documentation of "use of the the built in php mailer is no longer supported"), #2577 (PHP 7.1 support), #2506 (Do not upgrade if PHP version is not supported by new version), #2474 (Upgrade PHP-opencloud to support Swift DLO), and #8210 (Document support for PHP 7.2 in Changelog).

@tessus
Copy link

tessus commented Sep 10, 2018

@tobiasKaminsky Is send mode PHP deprecated or not working in nc 14?

I'm just asking because the nc14 docs don't mention anything about PHP being deprecated or removed.

@kesselb
Copy link
Contributor

kesselb commented Sep 10, 2018

Removed by upstream (swiftmailer dropped support for PHP transport). Here is the related pr #9791 and it's also mentioned in #7827 but the issue for updating docs is still open nextcloud/documentation#787

@tessus
Copy link

tessus commented Sep 10, 2018

@danielkesselberg Thx for the info.

@simonbuehler
Copy link

is there another way to get rid of this message, docs suggest encryption can't be reversed if a user would create a file in the meantime

@tobiasKaminsky
Copy link
Member Author

The encryption you linked has nothing to do with email, but it about encrypting the files stored on server.

To get rid of this message, you would have to a different email system than PHP.
This issue is about a false positive message that is shown even if SMTP is used.

@simonbuehler
Copy link

i already have smtp setup from the older versions but now the error is shown and i just want to get rid of it as you described in you first post

@Jens-Seidel
Copy link

I already have smtp setup from the older versions, but now the error is displayed and i just want to get rid of it, as you described in your first post

  • I feel the same way! SMTP definitely does not work

@tobiasKaminsky
Copy link
Member Author

SMTP definitely does not work

For me SMTP is working. This issue is only about the misleading warning.
If you experience a real problem with SMTP, then please open up a new issue.

@creopard
Copy link

I had the same isse, with the misleading error message although SMTP was already set in the admin settings interface (since NC12).
Check your config.php file for the value
mail_smtpmode
mine was still set to "php" as the updater did not change it automatically to "smtp"
After setting it manually to "smtp" the error message was gone.

@kyrofa
Copy link
Member

kyrofa commented Oct 4, 2018

Can we get this prioritized for 14.0.2?

@pachulo
Copy link
Contributor

pachulo commented Oct 7, 2018

I've just tested this with the snap and adding a config file like this:

$ cat /var/snap/nextcloud/current/nextcloud/config/email.config.php
<?php
$CONFIG = array (
  'mail_smtpmode' => ''
);

Makes the warning go away.

@pachulo
Copy link
Contributor

pachulo commented Oct 9, 2018

Could it be that the check to see if mail_smtpmode is still php implemented in 6a0c54d also triggers when the variable mail_smtpmode is not set at all @rullzer ?

Maybe something similar to this should be done:

To check if the variable is set before doing the comparison.

@fishscene
Copy link

I was wondering what the status of this issue is (Is anyone working on this? Scheduled for 14.02?). The last update was 2 weeks ago and this is currently blocking Nextcloud 14 for SNAP users.

Thanks all! I don't mean to sound pushy, just wanting to make sure this isn't forgotten about. :)

@kesselb
Copy link
Contributor

kesselb commented Oct 22, 2018

Could it be that the check to see if mail_smtpmode is still php implemented in 6a0c54d also triggers when the variable mail_smtpmode is not set at all @rullzer ?

Yes (the second argument is the default value returned when nothing defined).

@pachulo @fishscene Do you run nextcloud without mail?

@kyrofa
Copy link
Member

kyrofa commented Oct 22, 2018

Do you run nextcloud without mail?

I doubt it. Putting my own words in their mouth, I think what they're driving at is that this big warning is the default experience once someone installs Nextcloud for the first time. We try to streamline that flow in the snap as much as possible, and this gets in the way. We've already received bug reports about it, and we haven't even released it!

@kesselb
Copy link
Contributor

kesselb commented Oct 22, 2018

I agree with you that the warning is misleading. When i select either smtp or sendmail the message is gone. Just to be safe this is working for you? Then i would suggest to change

return $this->config->getSystemValue('mail_smtpmode', 'php') === 'php';
to $this->config->getSystemValue('mail_smtpmode') and things should work.

@kyrofa
Copy link
Member

kyrofa commented Oct 23, 2018

@danielkesselberg indeed, that patch removes the warning upon initial install, and email still works with it. Would you like to propose it, or shall I?

@kesselb
Copy link
Contributor

kesselb commented Oct 23, 2018

Would you like to propose it, or shall I?

Do it 👍

@pachulo
Copy link
Contributor

pachulo commented Nov 11, 2018

Well, I've created a PR with the proposed fix by @danielkesselberg ! Comments are very welcome!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests