Skip to content

Commit

Permalink
allow email host and port configuration for php mail sending
Browse files Browse the repository at this point in the history
  • Loading branch information
struan committed Oct 22, 2024
1 parent ae17c2a commit 6ab2d02
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions conf/general-example
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ define('ENTRIES_AFTER_LEFT', '{
// More Email addresses.

define('OPTION_SMTP_SMARTHOST', 'localhost');
define('OPTION_SMTP_PORT', 25);

// When a user reports an annotation, notification is sent to this address.
define ("REPORTLIST", CONTACTEMAIL);
Expand Down
2 changes: 2 additions & 0 deletions www/includes/utility.php
Original file line number Diff line number Diff line change
Expand Up @@ -781,6 +781,8 @@ function send_email($to, $subject, $message, $bulk = false, $from = '', $want_bo
$mail->addAddress($to);
$mail->Subject = $subject;
$mail->CharSet = 'utf-8';
$mail->Host = OPTION_SMTP_SMARTHOST;
$mail->Port = OPTION_SMTP_PORT;

if ($html) {
$mail->msgHTML($html, INCLUDESPATH . 'easyparliament/templates/emails');
Expand Down

0 comments on commit 6ab2d02

Please sign in to comment.