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:\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发送邮件的更多相关文章
- Linux简单配置SendMail发送邮件
本文简单整理了一下如何在Linux服务器上安装.配置SendMail发送邮件的步骤,此文不是配置邮件服务器,具体测试环境为CentOS Linux release 7.2.1511 (Core) ,如 ...
- dokuwiki 配置 sendmail 邮件发送
dokuwiki 发送邮件有2种方式: 一是直接使用 PHP 自带发送功能,需要配置 PHP.ini 文件, 我没试过,可参考官网 https://www.dokuwiki.org/tips:mail ...
- Ubuntu 中sendmail 的安装、配置与发送邮件的具体实现
一.安装 ubuntu中sendmail函数可以很方便的发送邮件,ubuntu sendmail先要安装两个包. 必需安装的两个包: 代码 sudo apt-get install sendmail ...
- sendmail 的安装、配置与发送邮件的具体实现
Ubuntu 中sendmail 的安装.配置与发送邮件的具体实现 centos安装sendmail与使用详解 CentOS下搭建Sendmail邮件服务器 使用外部SMTP发送邮件 使用mailx ...
- Linux sendmail发送邮件失败诊断案例(一)
在新服务器上测试sendmail发送邮件时,发现邮件发送不成功,检查日志文件发现如下错误(Notice:由于涉及公司服务器,邮箱等,故下面hostname.邮箱地址等信息使用xxx代替) tail - ...
- linux利用sendmail发送邮件的方法
Linux利用sendmail发送邮件, 方法1 安装sendmail即可使用, mail -s "test" user@sohu.com bin/mail会默认使用本地sendm ...
- centos下如何使用sendmail发送邮件
最近在实施服务端日志监控脚本,需要对异常情况发送邮件通知相关责任人,记录下centos通过sendmail发送邮件的配置过程. 一.安装sendmail与mail 1.安装sendmail: 1) ...
- Centos6.4安装配置sendmail
一.安装sendmail yum install -y sendmail yum install -y sendmail-cf 二. 安装salauthd //使用SMTP认证,需要安装saslaut ...
- php 使用sendmail发送邮件
php 使用sendmail发送邮件 1.配置php.ini SMTP=smtp.163.com sendmail_from = 17760273453@163.com sendmail_path = ...
随机推荐
- js 判断是否为正数
function validate(num) { var reg = /^\d+(?=\.{0,1}\d+$|$)/ if(reg.test(num)) return true; return ...
- Javaweb开发中URL路径的使用
看到博客园孤傲苍狼的web系列文章中有关于URL路径的使用文章后,感觉自己对URL的使用清楚了很多,自己再对着动手写一遍以加深记忆. JavaWeb开发中常看到URL以"/"开头, ...
- 曾经让我很吐血的Bug(初学者)
1.MSSql 就是 sql Server. 2.用session的时候一定要先实现接口IRequiresSessionState: 3.form表单中type=file传送文件的时候一定要在form ...
- QGIS
project(GisFreeMap) set(CMAKE_BUILD_TYPE Debug) find_package(Qt4 REQUIRED QtCore QtGui QtXml) includ ...
- CoreJavaE10V1P3.9 第3章 Java的基本编程结构-3.9 大数值(Big Numbers)
如果基本的整型与浮点型不能满足需求,可以使用java.Math包提供的 BigInteger 和 BigDecimal 两个类,这两个类可以存储任意长度的数, BigInteger 实现的任意精度整数 ...
- mysql循环插入数据库中数据。
DELIMITER ;; CREATE PROCEDURE test_insert () BEGIN DECLARE i INT DEFAULT 1; WHILE i<100 DO insert ...
- HTML,CSS,JS,JQ
CSS: <style> <!--属性选择器--> .container input[type="text"][name="txt"]{ ...
- 【IE6的疯狂之十一】CSS的优先级及!important在IE6下的BUG
一 css的优先级 今天有人跟我说css hack中用!important来区分ie6,因为ie6不支持!important,是的在很早以前我也是用过这种方法写hack,但是后来就基本不用了.本来我对 ...
- redis整合spring
最近公司项目有用到 所以找了一下实例.感觉很清晰. 完整项目路径http://www.cnblogs.com/dennisit/p/3614521.html看了一下应该没问题
- CF Round #354 Div.2
http://codeforces.com/contest/676 A. Nicholas and Permutation 题意:有一个从1到n的数列,可以任意对调两个数字一次,问数字1和n所在位置之 ...