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 = ...
随机推荐
- git commit
使用 git add 命令将想要快照的内容写入缓存区, 而执行 git commit 将缓存区内容添加到仓库中. Git 为你的每一个提交都记录你的名字与电子邮箱地址,所以第一步需要配置用户名和邮箱地 ...
- JavaEE XML XPath
JavaEE XML XPath @author ixenos XPath技术 1 引入 问题:当使用dom4j查询比较深的层次结构的节点(标签,属性,文本),比较麻烦!!!需要遍历DOM树的众多节点 ...
- sparksql中行转列
进入sparksql beeline -u "jdbc:hive2://172.16.12.46:10015" -n spark -p spark -d org.apache.hi ...
- CoreJavaE10V1P3.1 第3章 Java的基本编程结构-3.1 Java 最简程序
3.1Java最简程序 FirstSample.java public class FirstSample { public static void main(String[] args) { Sys ...
- Minicom配置及使用详解
因为现在电脑基本不配备串行接口,所以,usb转串口成为硬件调试时的必然选择.目前知道的,PL2303的驱动是有的,在dev下的名称是ttyUSB*. minicom,tkterm都是linux下应用比 ...
- WeakSelf宏的进化(转载)
我们都知道在防止如block的循环引用时,会使用__weak关键字做如下定义: __weak typeof(self) weakSelf = self; 后来,为了方便,不用每次都要写这样一句固定代码 ...
- python字符串和列表
import sys#sys.argv[0] 被设定为指定模块的全名#脚本名和附加参数传入一个名为 sys.argv 的字符串列表.你能够获取这个列表通过执行 import sys,列表的长度大于等于 ...
- Android使用 startActivityForResult 、 onActivityResult 时的注意事项
今天使用 startActivityForResult 时遇到两个问题,应该是常见问题了吧,浪费了些时间才搞定,做个记录. 1. onActivityResult 的触发顺序问题 这个问题很郁闷,我一 ...
- re模块 | Python 3.5
https://docs.python.org/3/library/re.html http://www.cnblogs.com/PythonHome/archive/2011/11/19/22554 ...
- magento中对获取的数据在前台进行分页显示
1.数据加载类class Bf170_Bf170Logistics_Block_Inquiry_Index extends Mage_Core_Block_Template { publ ...