下载 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:\wamp\sendmail\sendmail.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】

wamp配置sendmail发送邮件的更多相关文章

  1. Linux简单配置SendMail发送邮件

    本文简单整理了一下如何在Linux服务器上安装.配置SendMail发送邮件的步骤,此文不是配置邮件服务器,具体测试环境为CentOS Linux release 7.2.1511 (Core) ,如 ...

  2. dokuwiki 配置 sendmail 邮件发送

    dokuwiki 发送邮件有2种方式: 一是直接使用 PHP 自带发送功能,需要配置 PHP.ini 文件, 我没试过,可参考官网 https://www.dokuwiki.org/tips:mail ...

  3. Ubuntu 中sendmail 的安装、配置与发送邮件的具体实现

    一.安装 ubuntu中sendmail函数可以很方便的发送邮件,ubuntu sendmail先要安装两个包. 必需安装的两个包: 代码  sudo apt-get install sendmail ...

  4. sendmail 的安装、配置与发送邮件的具体实现

    Ubuntu 中sendmail 的安装.配置与发送邮件的具体实现 centos安装sendmail与使用详解 CentOS下搭建Sendmail邮件服务器 使用外部SMTP发送邮件  使用mailx ...

  5. Linux sendmail发送邮件失败诊断案例(一)

    在新服务器上测试sendmail发送邮件时,发现邮件发送不成功,检查日志文件发现如下错误(Notice:由于涉及公司服务器,邮箱等,故下面hostname.邮箱地址等信息使用xxx代替) tail - ...

  6. linux利用sendmail发送邮件的方法

    Linux利用sendmail发送邮件, 方法1 安装sendmail即可使用, mail -s "test" user@sohu.com bin/mail会默认使用本地sendm ...

  7. centos下如何使用sendmail发送邮件

    最近在实施服务端日志监控脚本,需要对异常情况发送邮件通知相关责任人,记录下centos通过sendmail发送邮件的配置过程. 一.安装sendmail与mail 1.安装sendmail:  1) ...

  8. Centos6.4安装配置sendmail

    一.安装sendmail yum install -y sendmail yum install -y sendmail-cf 二. 安装salauthd //使用SMTP认证,需要安装saslaut ...

  9. php 使用sendmail发送邮件

    php 使用sendmail发送邮件 1.配置php.ini SMTP=smtp.163.com sendmail_from = 17760273453@163.com sendmail_path = ...

随机推荐

  1. qdoc 写法

    Qdoc 注释 Qdoc注释有一些命令, 能够对文档进行组织. QDoc能识别以下3种类型的命令 主题(topic command) 主题命令确定了文档的元素,例如C++类(class),函数(fun ...

  2. getResourceAsStream和getResource的用法

    用JAVA获取文件,听似简单,但对于很多像我这样的新人来说,还是掌握颇浅,用起来感觉颇深,大家最经常用的,就是用JAVA的File类,如要取得 D:/test.txt文件,就会这样用File file ...

  3. linux 学习-用户&群组&权限

    Linux用户&群组&权限  ⦁ Linux安全性模型   1)Linux使用User和Group控制使用者对文件的存取权限   2)用户使用账号和口令登录Linux   3) ...

  4. Ubuntu中Qt5.7.0无法输入中文

    把libfcitxplatforminputcontextplugin.so复制到安装的Qt目录下的两个文件夹中 sudo apt install fcitx-frontend-qt5 sudo cp ...

  5. Heap Sort

    #include<iostream> using namespace std; const int MAX = 1001; int l[MAX]; //Heap Sort void Hea ...

  6. node-canvas

    1.使用之前需要预先安装  Cairo 本人安装遇到各种各样的坑,可以参考这里来填坑:https://github.com/Automattic/node-canvas/wiki/Installati ...

  7. Unity3d请求webservice

    我们在对接第三方sdk时,第三方sdk通常会以一个webservice接口的形式供我们来调用.而这些接口会以提供我们get,post,soap等协议来进行访问.get,post方法相信大家都比较熟悉了 ...

  8. hibernate、easyui、struts2整合

    <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...

  9. XTU 1246 Heartstone

    $2016$长城信息杯中国大学生程序设计竞赛中南邀请赛$D$题 贪心. 我是这样贪的:开三个优先队列$q[0]$,$q[1]$,$q[2]$,$q[i]$存储对$3$取余之后为$i$的数. 首先看看还 ...

  10. shell-逐行读取文件

    代码: #!/bin/bash echo 方法1 while read line do echo $line; done < testdata echo "" echo 方法 ...