PHP mac localhost 环境下发送邮件
转载自:http://mabblog.com/blog/2011/09/lion-smtp-postfix-relay-and-dreamhost/
When developing web-apps locally it is useful to have a fully functional smtp server to test automated emails associated with your application. Many times the network you are developing on will not allow you to simply start up postfix and and run your own local
smtp server. However, this doesn’t imply that you can’t use postfix – modifying postfix to relay all outgoing mail to an external / offsite smtp server that you have control of will enable you to develop & test the parts of your application that require a
local outgoing smtp server without an issue.
Many times port 25 (the default smtp port) will be blocked somewhere along the line in your network connection. You can figure out if your network configuration or ISP is blocking port 25 by running
Edit /etc/postfix/main.cf
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_use_tls = yes
Create/edit /etc/postfix/sasl_passwd
Run this command in your shell once the above two files are created/modified:
sudo postmap /etc/postfix/sasl_passwd
sudo launchctl stop org.postfix.master
sudo launchctl start org.postfix.master
# test postfix, cmd+d after typing message content to send message
mail -s "Testing, Testing" you@domain.com
PHP mac localhost 环境下发送邮件的更多相关文章
- 在Mac OS环境下安装MySQL服务
在Mac OS环境下安装MySQL服务 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 我之前介绍过window环境下安装mysql服务,以及在Linux环境下安装mysql服务,今 ...
- 桂电在linux、Mac OS环境下使用出校器(支持2.14)
这是guetsec学长在三院科协学长所抓包逆向分析1.81版出校器的基础上,用python写的一款为Mac和linux环境开发的出校器. 最后我做了略微修改,支持暂时最新版本2.14.下面有直接从源码 ...
- Mac+Docker环境下xdebug的配置
由于容器化的需要,前几天我本地也换成了docker环境.就研究了一下docker环境下phpstorm和xdebug的配置. http://www.mmfei.com/?p=453 这个博客给出了一个 ...
- Mac OS环境下媒体文件分割工具mediafilesegmenter的简单使用(生成M3U8 TS文件)
mediafilesegmenter是苹果开发的一款用于分割媒体文件的工具,其功能与mediastreamsegmenter相似,但操作更简单. * 具体可以对比博客中的另一篇简介<Mac OS ...
- 用C#(ASP.Net)在Exchange Server环境下发送邮件
普通的邮件, 用System.Net.Mail 类 或 System.Web.Mail 类 处理即可, 但是Exchange Server 环境下, 这两个类起不了作用-------至少目前我看到的情 ...
- Mac python3 环境下 完善pdf转jpg脚本
由于样本图片数据都是保存在pdf里,想拿到样本必须先把图片从pdf中提取出来,算是数据清洗中的一点小小的积累吧. 这里不得不吐槽一下公司存储图片的机制,业务员把jpg格式的照片放到word里,然后用工 ...
- MAC OSX环境下cordova+Ionic的安装配置
一.简介 1.Ionic是什么 IONIC 是目前最有潜力的一款 HTML5 手机应用开发框架.通过 SASS 构建应用程序,它提供了很多 UI 组件来帮助开发者开发强大的应用. 它使用 JavaSc ...
- Mac OS环境下配置Myeclipse2015的经验
反复测试装了多次,现在把成功安装的方法陈列如下: 1. 相关的资源: (1)下载 myeclipse-2015-stable-2.0-offline-installer-macosx.dmg 链接:h ...
- Mac OS 环境下 安装 Asp.Net及使用Yeoman 创建Asp.Net 项目
本文是按照英文原文:Installing ASP.NET 5 On Mac OS安装时遇到的问题的总结Blog. 原文提示如下: Installing ASP.NET 5 On Mac OS XBy ...
随机推荐
- js知识点——1
onload 事件会在页面或图像加载完成后立即发生. document.write("内容")将在加载页面时输出 内容可以是什么,可以是一个标签,它输出的文件不能自动换行: < ...
- Layui数据表格的接口数据请求方式为Get
Layui数据表格的接口数据请求方式为Get
- numpy-排序
numpy 有多种排序方法. sort sort(self, axis=-1, kind='quicksort', order=None):排完序后改变原值 [只有这个方法改变原值] axis : i ...
- cs244a-Introduction to Computer Networking-Unit1
Unit 1 学习目标: how an application use the Internet The structure of the Internet:The 4 layer model The ...
- python2.7.5升级到2.7.14或者直接升级到3.6.4
python2.7.5升级到2.7.14 1.安装升级GCC yum install -y gcc* openssl openssl-devel ncurses-devel.x86_64 bzip2 ...
- P4868 Preprefix sum
传送门 挺显然的一题?单点修改,前缀和数组前缀查询 树状数组就可以维护了 考虑每个位置对应询问的贡献,设询问的位置为 $x$,对于原数组 $a[i]$ 的某个位置 $i$,它会贡献 $(x-i+1)* ...
- redis 模拟redis server接收信息
一.实现说明 客户端使用jedis正常set值到redis服务器 2. 模拟服务器接收jedis发送的信息 二.jedis客户端代码 package com.ahd.redis; import r ...
- 关于strcpy的安全函数的选择
1)如果整个程序,在进行字符拷贝时,这个拷贝字符串的完整性,不影响整个程 序的运行,可以让其截取一部分字符串,程序继续执行.那么我们就可以选择安全 函数:strncpy_s 2)如果在进行字符串拷贝时 ...
- 十一、LaTex中的矩阵
- MEWKit:Cryptotheft 的最新武器
By:Yonathan Klijinsma 译者:知道创宇安全服务团队.404区块链安全团队 介绍 当谈到加密货币时,会联想到加密货币巨大的价格波动,交易违约.赎金勒索的情况以及许多不同种类的货币.虚 ...