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 = ...
随机推荐
- >> 计算机的数据表示
1. 采用二进制 2. 负数采用补码表示 3. 乘法处理 4. 浮点数
- 从A页面跳转到B页面,从B页面按浏览器自带按钮返回到A页面并且刷新页面--手机操作浏览器自带返回并自带刷新
<html> <head> <meta http-equiv="Content-Type" content="text/html; char ...
- DuiLib 中滚动条不显示的问题
DuiLib 很好用,同时在没有完全理解源码的前提下,坑也不少,比如今天遇到的添加滚动条不显示... 情况是这样的,将一个页面作为Tab控件的其中一页,为了代码不窝在一起,就没有在CreateCont ...
- Python将列表中的string元素进行类型转换
例如 将 a=['1','2.0','3L'] 转换为 a=[1,2.0,3L] 只需 map(eval,['1','2.0','3L']) 即可 eval(expression[, globals[ ...
- 【IE6的疯狂之十二】一个display:none引起的3像素的BUG
今天同事给我看了一个display:none引起的3像素的BUG,非常奇怪!从来没碰到过display:none还能引起这种bug. 看代码: <div style="width: ...
- 在ubuntu下设置eclipse开发STM32等嵌入式设备
之前为了能够让ROS与底层能够顺利通讯,我采用可开源开发板arduino ,因为arduino有ROS的库,能够按照ROS wiki上所给的教程就可以顺利的开发,但由于arduino的局限性,我觉得是 ...
- 淘宝npm镜像使用方法
镜像使用方法(三种办法任意一种都能解决问题,建议使用第三种,将配置写死,下次用的时候配置还在): 通过config命令npm config set registry https://registry. ...
- cocoaPods安装成功终端代码(期间报error: RPC failed; result=56, HTTP code = 200)
Last login: Sat Oct 15 23:30:24 on ttys002 Sivek_lindeMacBook-Pro:~ Sivek_lin$ sudo gem update --sys ...
- Python数据预处理—训练集和测试集数据划分
使用sklearn中的函数可以很方便的将数据划分为trainset 和 testset 该函数为sklearn.cross_validation.train_test_split,用法如下: > ...
- tomcat7或8如何修改浏览器标题上的ICON小图标
替换tomcat根目录/webapps/ROOT下的favicon.ico文件,之后重启了服务器,可是还是显示那只猫的图标. 如果不能显示,请清除浏览器的缓存