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

PHP Mailer SMTP and "Secure Mail" conflict #10312

Closed
Tealk opened this issue May 24, 2021 · 7 comments · Fixed by friendica/friendica-addons#1127
Closed

PHP Mailer SMTP and "Secure Mail" conflict #10312

Tealk opened this issue May 24, 2021 · 7 comments · Fixed by friendica/friendica-addons#1127
Milestone

Comments

@Tealk
Copy link

Tealk commented May 24, 2021

  • [ x ] I have searched open and closed issues for duplicates

Bug Description

When the add-on is enabled, you are always redirected to a white page when a mail is sent. However, the mail is sent properly.

Steps to Reproduce

  1. enable PHP Mailer SMTP - 0.2 and Secure Mail - 2.0
  2. enter settings in addon.config.php
  3. register a new account or test the Secure Mail

Actual Result:

The email is sent but you are redirected to a white page without being redirected back

Expected Result:

That you are redirected to the login page again.

Platform Info

Friendica Version:

Friendica Source: 'Siberian Iris' 2021.04 - 1413

PHP version: 7.4.18

SQL version: 10.5.10-MariaDB-1:10.5.10+maria~buster

@Tealk Tealk added the Bug label May 24, 2021
@AlfredSK
Copy link

AlfredSK commented May 24, 2021

The white page is probably a fatal PHP error. You should find the error and a stack trace in your PHP error log.

Btw. I'm using the PHPMailer add-on too. The new users didn't complain about such an issue lately. But I didn't try to register an account myself.

Edit: I have asked a new user about the registration process. He had no white screen issue. I'm not using securemail.

@Tealk
Copy link
Author

Tealk commented May 24, 2021

Thank you @AlfredSK I had not even thought about it
Here is the error:

2021/05/24 18:45:22 [error] 3924#3924: *1702811 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught TypeError: Argument 2 passed to securemail_emailer_send_prepare() must implement interface Friendica\Object\EMail\IEmail, null given, called in /var/customers/webs/Anzah/rollenspiel.group/src/Core/Hook.php on line 217 and defined in /var/customers/webs/Anzah/rollenspiel.group/addon/securemail/securemail.php:106
Stack trace:
#0 /var/customers/webs/Anzah/rollenspiel.group/src/Core/Hook.php(217): securemail_emailer_send_prepare()
#1 /var/customers/webs/Anzah/rollenspiel.group/src/Core/Hook.php(193): Friendica\Core\Hook::callSingle()
#2 /var/customers/webs/Anzah/rollenspiel.group/src/Util/Emailer.php(131): Friendica\Core\Hook::callAll()
#3 /var/customers/webs/Anzah/rollenspiel.group/src/Model/User.php(1346): Friendica\Util\Emailer->send()
#4 /var/customers/webs/Anzah/rollenspiel.group/src/Module/Register.php(319): Friendica\Model\User::sendRegisterOpenEmail()
#5 [internal function]: Friendica\Module\Register::post()
#6 /var/customers/webs/Anzah/rollenspiel.group" while reading response header from upstream, client: 188.98.142.200, server: rollenspiel.group, request: "POST /register HTTP/2.0", upstream: "fastcgi://unix:/var/lib/fastcgi/1-anzah-rollenspiel.group-php-fpm.socket:", host: "rollenspiel.group", referrer: "https://rollenspiel.group/register"

@AlfredSK
Copy link

Ah! Looks like the problem is in the securemail add-on.

@Tealk
Copy link
Author

Tealk commented May 24, 2021

Ok I just tested this again, only if "PHP Mailer SMTP" and "Secure Mail" are enabled this problem occurs

@Tealk Tealk changed the title PHP Mailer SMTP redirects to a white page PHP Mailer SMTP and "Secure Mail" conflict May 24, 2021
@tobiasd tobiasd added the Addons label May 25, 2021
@tobiasd tobiasd added this to the 2021.06 milestone May 25, 2021
@tobiasd
Copy link
Collaborator

tobiasd commented May 25, 2021

Interesting, without the SMTP addon the Secure Mail addon seems to work fine (at least it does for me).

@Tealk
Copy link
Author

Tealk commented May 25, 2021

Interesting, without the SMTP addon the Secure Mail addon seems to work fine (at least it does for me).

yes that's what I meant with my last answer

@nupplaphil
Copy link
Collaborator

should be fixed with friendica/friendica-addons#1127

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

Successfully merging a pull request may close this issue.

4 participants