Mantis 企业邮箱配置

随着项目内容越来越零散,东西越来越复杂,有必要启用项目管理工具了,今天花了点时间把mantis装上了,其中遇到几个问题,记录下来。

环境:wampServer

邮件:Google企业邮箱

安装过程很简单,直接将下载下来的mantis文件解压到www目录下面,然后访问下,安装即可。

今天碰到的问题是使用Google企业邮箱时出现的一个错误

 
  
  1. SYSTEM WARNING: 'stream_socket_enable_crypto() [streams.crypto]: this stream does not support SSL/crypto' in 'D:\wamp\www\mantisbt\library\phpmailer\class.smtp.php' line 197 

上网查了一下说是openssl的问题,想了想,应该是php的openssl扩展没有启用的原因,于是在桌面的右下角点击wampserver,启用该功能,如图:

 

 

这样用户注册的时候就可以收到Google企业邮箱发送的确认信息了。

顺便说下Google企业邮箱的在mantis中的配置

拷贝config_defaults_inc.php中的内容到config_inc.php中,并做以下修改:

 

 
  
  1. /** 
  2.      * Administrator Email address 
  3.      * @global string $g_administrator_email 
  4.      */ 
  5.     $g_administrator_email  = 'xxx@xxx.com'
  6.  
  7.     /** 
  8.      * Webmaster email 
  9.      * @global string $g_webmaster_email 
  10.      */ 
  11.     $g_webmaster_email      = 'xxx@xxx.com'
  12.  
  13.     /** 
  14.      * the sender email, part of 'From: ' header in emails 
  15.      * @global string $g_from_email 
  16.      */ 
  17.     $g_from_email           = 'xxx@xxx.com'
  18.  
  19.     /** 
  20.      * the sender name, part of 'From: ' header in emails 
  21.      * @global string $g_from_name 
  22.      */ 
  23.     $g_from_name            = 'Mantis Bug Tracker'
  24.  
  25.     /** 
  26.      * the return address for bounced mail 
  27.      * @global string $g_return_path_email 
  28.      */ 
  29.     $g_return_path_email    = 'xxx@xxx.com'
  30.  
  31.     /** 
  32.      * Allow email notification. 
  33.      * Set to ON to enable email notifications, OFF to disable them. Note that 
  34.      * disabling email notifications has no effect on emails generated as part 
  35.      * of the user signup process. When set to OFF, the password reset feature 
  36.      * is disabled. Additionally, notifications of administrators updating 
  37.      * accounts are not sent to users. 
  38.      * @global int $g_enable_email_notification 
  39.      */ 
  40.     $g_enable_email_notification    = ON; 

 

 
  
  1. /** 
  2.      * select the method to mail by: 
  3.      * PHPMAILER_METHOD_MAIL - mail() 
  4.      * PHPMAILER_METHOD_SENDMAIL - sendmail 
  5.      * PHPMAILER_METHOD_SMTP - SMTP 
  6.      * @global int $g_phpMailer_method 
  7.      */ 
  8.     $g_phpMailer_method     = 2; 
  9.  
  10.     /** 
  11.      * This option allows you to use a remote SMTP host.  Must use the phpMailer script 
  12.      * One or more hosts, separated by a semicolon, can be listed. 
  13.      * You can also specify a different port for each host by using this 
  14.      * format: [hostname:port] (e.g. "smtp1.example.com:25;smtp2.example.com"). 
  15.      * Hosts will be tried in order. 
  16.      * @global string $g_smtp_host 
  17.      */ 
  18.     $g_smtp_host            = 'smtp.gmail.com'
  19.  
  20.     /** 
  21.      * These options allow you to use SMTP Authentication when you use a remote 
  22.      * SMTP host with phpMailer.  If smtp_username is not '' then the username 
  23.      * and password will be used when logging in to the SMTP server. 
  24.      * @global string $g_smtp_username 
  25.      */ 
  26.     $g_smtp_username = 'xxx@xxx.com'
  27.  
  28.     /** 
  29.      * SMTP Server Authentication password 
  30.      * @global string $g_smtp_password 
  31.      */ 
  32.     $g_smtp_password = 'xxxxxx'
  33.  
  34.     /** 
  35.      * This control the connection mode to SMTP server. Can be 'ssl' or 'tls' 
  36.      * @global string $g_smtp_connection_mode 
  37.      */ 
  38.     $g_smtp_connection_mode = 'tls'
  39.  
  40.     /** 
  41.      * The smtp port to use.  The typical SMTP ports are 25 and 587.  The port to use 
  42.      * will depend on the SMTP server configuration and hence others may be used. 
  43.      * @global int $g_smtp_port 
  44.      */ 
  45.     $g_smtp_port = 587; 

至此,我们的mantis邮件提醒功能可以正常使用了