Skip to content

Commit

Permalink
Fix 8369: Making phpMail work with Gmail
Browse files Browse the repository at this point in the history
git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@4957 f5dc347c-c33d-0410-90a0-b07cc1902cb9
  • Loading branch information
giallu committed Feb 5, 2008
1 parent 41ad079 commit e966f46
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions config_defaults_inc.php
Expand Up @@ -344,6 +344,10 @@
# and password will be used when logging in to the SMTP server.
$g_smtp_username = '';
$g_smtp_password = '';

# This control the connection mode to SMTP server. Can be 'ssl' or 'tls'
$g_smtp_connection_mode = '';


# It is recommended to use a cronjob or a scheduler task to send emails.
# The cronjob should typically run every 5 minutes. If no cronjob is used,
Expand Down
4 changes: 4 additions & 0 deletions core/email_api.php
Expand Up @@ -778,6 +778,10 @@ function email_send( $p_email_data ) {
$mail->Password = config_get( 'smtp_password' );
}

if ( ! is_blank( config_get( 'smtp_connection_mode' ) ) ) {
$mail->SMTPSecure = config_get( 'smtp_connection_mode' );
}

if ( OFF !== $t_debug_email ) {
$t_message = 'To: '. $t_recipient . "\n\n" . $t_message;
$mail->AddAddress( $t_debug_email, '' );
Expand Down

0 comments on commit e966f46

Please sign in to comment.