Prechádzať zdrojové kódy

Improve documentation: example code to configure SMTP (#4555)

* add example code

* just a changed line break

* fix

* Fix

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
maTh 3 rokov pred
rodič
commit
10f29a7362

+ 19 - 2
docs/en/admins/05_Configuring_email_validation.md

@@ -26,12 +26,29 @@ To configure a SMTP server, you’ll have to modify the `data/config.php` file.
 
 First, change the `mailer` item to `smtp` (instead of the default `mail`).
 
-Then, you should change the `smtp` options like you would do with a regular
-email client. You can find the full list of options in the [`config.default.php` file](https://github.com/FreshRSS/FreshRSS/blob/edge/config.default.php).
+Then, you should change the `smtp` options like you would do with a regular email client.
+You can find the full list of options in the [`config.default.php` file](https://github.com/FreshRSS/FreshRSS/blob/edge/config.default.php).
 If you’re not sure to what each item is corresponding, you may find useful [the
 PHPMailer documentation](http://phpmailer.github.io/PHPMailer/classes/PHPMailer.PHPMailer.PHPMailer.html#properties)
 (which is used by FreshRSS under the hood).
 
+### Example code to configure SMTP server
+
+```php
+	'mailer' => 'smtp', // instead of 'mail'
+	'smtp' => array(
+		'hostname' => 'example.net',
+		'host' => 'smtp.example.net', // URL to your smtp server
+		'port' => 465,
+		'auth' => true,
+		'auth_type' => '',
+		'username' => 'alice', // or maybe alice@example.net
+		'password' => 'yoursecretpassword',
+		'secure' => 'ssl', // '', 'ssl' or 'tls'
+		'from' => 'alice@example.net',
+	),
+```
+
 ## Check your SMTP server is correctly configured
 
 To do so, once you’ve enabled the `force_email_validation` option, you only