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

phpmailer config #12135

Closed
jakedfw opened this issue Nov 7, 2022 · 10 comments
Closed

phpmailer config #12135

jakedfw opened this issue Nov 7, 2022 · 10 comments

Comments

@jakedfw
Copy link

jakedfw commented Nov 7, 2022

Hi all, I'm still having email issues and am trying phpmailer. Everytime I update the config file though the site crashes and wont' run. Here's my addon.config.php file. The first thing I noticed is that phpmailer file doesn't have the login password. Where should that go? Also, would the lack of a password crash the site? If not, what is doing it?

<?php

// Addon configuration

// Copy this configuration file to addon.config.php and edit it if you want to configure ad>

'phpmailer' => [
    // smtp (Boolean)
    // Enables SMTP relaying for outbound emails
    'smtp' => true,

    // smtp_server (String)
    // SMTP server host name
    'smtp_server' => 'smtp-relay.smtpprovider.com',

    // smtp_port (Integer)
    // SMTP server port number
    // 'smtp_port' => 587,

    // smtp_secure (String)
    // What kind of encryption to use on the SMTP connection.
    // Options: '', 'ssl' or 'tls'.
    'smtp_secure' => 'tls',

    // smtp_port_s (Integer)
    // Secure SMTP server port number
    'smtp_port_s' => 587,

    // smtp_username (String)
    // SMTP server authentication user name
    // Empty string disables authentication
    'smtp_username' => 'jake@emailaddress.com',

@MrPetovan
Copy link
Collaborator

See the full range of available configuration keys: https://github.com/friendica/friendica-addons/blob/develop/phpmailer/config/phpmailer.config.php

There is smtp_password as well.

@MrPetovan
Copy link
Collaborator

When there's a crash, there should be an entry in PHP's log or your web server log. Please peruse these for errors related to phpmailer.

@jakedfw
Copy link
Author

jakedfw commented Nov 8, 2022

Oops. I had it configured with all those options, and it still didn't work. Formatted correctly, too. I checked for the logs via the Friendica UI but it was empty. I'll check the logs directory.

Thanks!

@jakedfw jakedfw closed this as completed Nov 8, 2022
@MrPetovan
Copy link
Collaborator

The Friendica log sometimes won't show anything if there's a crash before the Friendica logger is instantiated. In this case, the fallback log is the web server's or php-fpm log.

@TheNomad11
Copy link

Had same issue here, the reason it didn't work was that the configuration part within friendica admin panel was incomplete. Copying and pasting it from https://github.com/friendica/friendica-addons/blob/develop/phpmailer/config/phpmailer.config.php solved the issue.

return [

was missing, and the closing

];

@TheNomad11
Copy link

Nevertheless, Friendica does not use phpmailer but insists using mail or sendmail. How can I troubleshoot this? Or would it be better installing postfix with external smtp?

@MrPetovan
Copy link
Collaborator

If you don't want to install Postfix because you don't need the mail reception features, I've been using ssmpt with an external SMTP server (Fastmail) with success.

@TheNomad11
Copy link

Thanks a lot, @MrPetovan I was not aware of ssmpt, It is really as easy as described here? https://en.acodeof.com/install-ssmtp-ubuntu/ I will have a try later today. Maybe we should add it to the Friendica docs?

@MrPetovan
Copy link
Collaborator

MrPetovan commented Dec 4, 2022

It is easy enough that I was able to set it up by myself. I'm a decent programmer, but I'm not a good system administrator, so it's a good metrics for how easy it is. And you're so welcome to add it to the Friendica docs once you managed to do it!

@TheNomad11
Copy link

Thanks so much, you were right, I've made it, yeah!

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

No branches or pull requests

3 participants