social-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Social-discuss] Config of GNUsocial for e-mail (smtp). Knowledge sharin


From: Knut Erik Hollund
Subject: [Social-discuss] Config of GNUsocial for e-mail (smtp). Knowledge sharing.
Date: Sun, 05 Oct 2014 21:31:32 +0200

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi all,

Some knowledge sharing about setting up eMail notifications in
GNUsocial. (Instance - quitter.no )

I tried to set the configuration in the config.php in the following way:
//Mail
$config['mail']['domain'] = 'quitter.no';
$config['mail']['host'] = 'smtp.domeneshop.no';
$config['mail']['notifyfrom'] = '"Quitter.no" <address@hidden>';
$config['mail']['auth'] = true;
$config['mail']['check_domain'] = false;
$config['mail']['port'] = '587';
$config['mail']['username'] = ‘myusername’;
$config['mail']['password'] = ‘my_secret’_password;
$config['mail']['backend'] = 'smtp';
$config['mail']['debug'] = false;

However this setup did not work.
I read through /lib/mail.php code and discovered that the
configuration is consumed in a differnt way.
One important line is in the function mail_backend() - /lib/mail.php file.

The following code appear :
$backend = Mail::factory(common_config('mail', 'backend'),
                    common_config('mail', 'params') ?: array());


The config’s are read through the ‘params’ array, which does not fit
to my config.php file.

So I had to change it to the following:
//Mail
$config['mail']['domain'] = 'quitter.no';
$config['mail']['notifyfrom'] = '"Quitter.no" <address@hidden>';
$config['mail']['backend'] = 'smtp';
$config['mail']['debug'] = false;
$config['mail']['params'] = array(
'host' => 'smtp.domeneshop.no',
'port' => 587,
'auth' => true,
'username' => ‘myusername’,
'password' => ‘my_secret_password’
);

After this a restart of my apache2 process was needed to get the
flow/emails going. (Was not enough to just change the config.php).

So I guess the mail.php code should be cleaned up to either support
both ways to configure or only one way and documented properly. (You
might know this already).

Just my 2c.

/KE
Admin of Quitter.no

- -- 
Knut Erik Hollund
GPG key: CFAB0378
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQEcBAEBAgAGBQJUMZyUAAoJEDimQAbPqwN4XKEH/23SdLPEyONrFh7T0Q8Y0A0n
r33sPYYJUH/XB+mZGC3Tv6t4lLBccmNCqTizQCTE3XKweA0CXcU8mrbHVGRgEPxo
+MZBZZsbU3qcZVBgNZEM6lXOJ30W0iuqNhgnJajBsdS2b4w+vsgvf5CaeNVHiA/c
CM9Kgx2Vc24JMCmr32GR1hANwtTJO61gR2zCL7PmuQ2M3y6kMqaiDcMdn0FWXmDK
WwcHrtSvlkN+pZAeSr/OZu+zz5z/6HAbttYUzcud6YnxXtJIwfxIzqFDPhCo/gex
FoTmZUzl1FOPPODIWl0D3pd5lahdHVUxQUmvTzXdgioapprN9zuYSwBkw2jvnUY=
=Te4K
-----END PGP SIGNATURE-----



reply via email to

[Prev in Thread] Current Thread [Next in Thread]