Skip to content

Commit

Permalink
Use environment variables to define email settings
Browse files Browse the repository at this point in the history
  • Loading branch information
daneov committed Jul 9, 2022
1 parent cb2de13 commit ae83bd6
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions application/config/email.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
// @link https://codeigniter.com/user_guide/libraries/email.html

$config['useragent'] = 'Easy!Appointments';
$config['protocol'] = 'mail'; // or 'smtp'
$config['protocol'] = 'smtp'; // or 'smtp'
$config['mailtype'] = 'html'; // or 'text'
// $config['smtp_debug'] = '0'; // or '1'
// $config['smtp_auth'] = TRUE; //or FALSE for anonymous relay.
// $config['smtp_host'] = '';
// $config['smtp_user'] = '';
// $config['smtp_pass'] = '';
// $config['smtp_crypto'] = 'ssl'; // or 'tls'
// $config['smtp_port'] = 25;
$config['smtp_auth'] = TRUE; //or FALSE for anonymous relay.
$config['smtp_host'] = $_ENV['MAIL_SMTP_SERVER'] ?? '';
$config['smtp_user'] = $_ENV['MAIL_SMTP_LOGIN'] ?? '';
$config['smtp_pass'] = $_ENV['MAIL_SMTP_PASSWORD'] ?? '';
$config['smtp_crypto'] = $_ENV['MAIL_SMTP_ENCRYPTION'] ?? 'tls'; // 'tls' or 'ssl'
$config['smtp_port'] = $_ENV['MAIL_SMTP_PORT'] ?? 587;

0 comments on commit ae83bd6

Please sign in to comment.