• TestLink学习三:发送邮件的两种配置方法


    第一种:修改config.inc.php中的[smtp],配置为默认本地发送,用hotmail用户做接收,调试成功!(本人未尝试这种)

    复制代码
    // ----------------------------------------------------------------------------
    /** [SMTP] */
    
    // Developer Note:
    // these config variable names has been choosed to maintain compatibility
    // with code taken from Mantis.
    // 
    // SMTP server Configuration ("localhost" is enough in the most cases)
    
     $g_tl_admin_email = 'tl_admin@127.0.0.1';#按此配置即可
     $g_from_email = 'testlink_system@127.0.0.1';#按此配置即可
     $g_return_path_email = 'no_replay@127.0.0.1';#按此配置即可
     //
     # Urgent = 1, Not Urgent = 5, Disable = 0
     $g_mail_priority = 5;
    
     //
     # Taken from mantis for phpmailer config
     //define ("SMTP_SEND",2);
     //$g_phpMailer_method = SMTP_SEND;
    
    //
     // SMTP Configuration
     $g_smtp_host = 'localhost'; # SMTP server
     //
     // Configure only if SMTP server requires
     $g_smtp_username = ''; # user
     $g_smtp_password = ''; # password
    
    // ----------------------------------------------------------------------------
    复制代码

     

    第二种:修改config.inc.php中的[smtp],配置为公司邮箱发送,用我公司邮箱调试成功!(本人调试成功)

    复制代码
    // ----------------------------------------------------------------------------
    /** [SMTP] */
    
    // Developer Note:
    // these config variable names has been choosed to maintain compatibility
    // with code taken from Mantis.
    // 
    // SMTP server Configuration ("localhost" is enough in the most cases)
    $g_smtp_host        = 'smtp.corp.com';  # SMTP 服务必须配置,可配置你公司发送邮件服务器地址
    
    # Configure using custom_config.inc.php
    $g_tl_admin_email     = 'test@corp.com'; #问题错误通知,配置你公司的邮箱
    $g_from_email         = 'test@corp.com';  # 收到邮件看到的发送地址
    
    $g_return_path_email  = 'test@corp.com';#如果收到邮件的人进行回复的邮件地址
    
    # Urgent = 1, Not Urgent = 5, Disable = 0
    $g_mail_priority = 5;  
    
    # Taken from mantis for phpmailer config
    define ("SMTP_SEND",2);
    $g_phpMailer_method = SMTP_SEND;#使用SMTP协议进行发送
    
    // Configure only if SMTP server requires authentication
    $g_smtp_username    = 'test@corp.com';  # smtp发送的用户名  
    $g_smtp_password    = 'test';  # 发送用户的密码
    
    // ----------------------------------------------------------------------------
    复制代码
  • 相关阅读:
    CSS中float与A标签的疑问
    常用的Css命名方式
    div css 盒子模型
    HTML初级教程 表单form
    Redis学习记录(二)
    Redis学习记录(一)
    Java源码——HashMap的源码分析及原理学习记录
    java编程基础——从上往下打印二叉树
    java编程基础——栈压入和弹出序列
    java基础编程——获取栈中的最小元素
  • 原文地址:https://www.cnblogs.com/hujiang1985/p/7236260.html
Copyright © 2020-2023  润新知