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 ...
随机推荐
- POJ - 1287 Networking (最小生成树&并查集
You are assigned to design network connections between certain points in a wide area. You are given ...
- html之input
<input>在w3c中解释的是用于搜集用户的信息 它其实就是一个输入框,根据type的不同这个框可以用作不同的功能可以输入一个文本,可以定义一个按钮什么的. 属性type一些值的介绍 1 ...
- Head First PHP&MySQl第二章代码
PHP: <html> <head> <title>外星人绑架了我--报道一起绑架</title> </head> <body> ...
- [wpf] collectionViewsource 排序 和分组
xmlns:scm="clr-namespace:System.ComponentModel;assembly=WindowsBase" xmlns:swd="clr-n ...
- gradle 刷新打包的时候报错
java.lang.AbstractMethodError: org.jetbrains.plugins.gradle.tooling.util.ModuleComponentIdentifierIm ...
- 2019-11-29-C#-很少人知道的科技
title author date CreateTime categories C# 很少人知道的科技 lindexi 2019-11-29 10:12:43 +0800 2018-03-16 08: ...
- Apache ab测试工具使用方法(无参、get传参、post传参)(转)
转自Apache ab测试工具使用方法(无参.get传参.post传参) Ab测试工具是apache自带的测试工具,具有简单易上手的特性,下面我总结一下我的使用方法,首先去官方下载apache程序包, ...
- Delphi 条件语句和程序的选择结构
- 索尼展示基于MicroLED技术的16K显示屏:约780吋
尽管 8K 彩电刚刚在消费级市场崭露头角,更极致的 16K 却已不慌不忙地登场了. 在日前于拉斯维加斯举办的 NAB 2019 展会上,索尼就秀出了旗下的 16K 显示设备,它目前正在日本横滨的资生堂 ...
- laravel-admin 表单提交报错
Method App\Admin\Controllers\GoodsSpecController::store does not exist. Method App\Admin\Controllers ...