zoukankan      html  css  js  c++  java
  • wamp配置sendmail发送邮件

    下载 sendmail ( 地址: http://www.glob.com.au/sendmail/sendmail.zip )

    【PHP.ini 配置】

    [mail function]
    ; For Win32 only.
    SMTP = smtp.163.com

    ; For Win32 only.
    sendmail_from = sample@163.com

    ; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
    sendmail_path ="D:wampsendmailsendmail.exe -t"//注意是反斜杠

    【endmail.ini 配置】

    smtp_server=smtp.163.com

    smtp_port=25

    smtp_ssl=auto

    error_logfile=error.log

    debug_logfile=debug.log

    auth_username=sample@163.com
    auth_password=********//即邮箱登陆密码

    force_sender=sample@163.com

    【测试程序】

    1.

    <?php
    header("Content-type:text/html;charset=GBK");
    
    if(mail("sample@qq.com","测试","测试邮件")){
        echo "发送成功!!";
    }else{
        echo "发送失败!!";
    }
    
    ?>

    2.

    <?php
    
    $to = "sample@qq.com";
    $subject = "Test mail";
    $message = "Hello! This is a simple email message.";
    $from = "someonelse@example.com";
    $headers = "From: $from";
    mail($to,$subject,$message);
    echo "Mail Sent.";
    
    ?>

    【FYI,THX】

  • 相关阅读:
    奇异值分解
    特征值和特征向量
    矩阵
    矢量化
    符号数组
    通用函数
    数据平滑
    多项式拟合
    协方差/相关矩阵/相关系数
    json
  • 原文地址:https://www.cnblogs.com/Tiago/p/3980825.html
Copyright © 2011-2022 走看看