Mail2PHP [英] Mail2PHP
本文介绍了Mail2PHP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想直接发送电子邮件到我服务器上的目录
我需要做什么脚本?
也许我应该为我的别名添加一行文件如下:emailaddress:
" | / usr / bin / email2directory" ?
感谢您的别名中的一些建议
解决方案
输入一行如下:
mailprog:" | / usr / local / bin / php /path/to/your/file.php"
以下脚本将阅读收到的整个电子邮件并将其存储在
缓冲区
为你做你想做的事情......
< ?php
define(''STDIN'',fopen(" php:// stdin"," r"));
// define('' STDIN'',fopen(" dev / stdin"," r"));
str = fgets(STDIN);
I want to send an email directly to a directory on my server
what script do I need to do this?
Maybe I should add a line to my aliases file like this: emailaddress:
"|/usr/bin/email2directory" ?
Thanks for some suggestions
解决方案
in your aliases enter a line such as:
mailprog: "|/usr/local/bin/php /path/to/your/file.php"
The below script will read the entire email recieved and store it in
buffer
for you do do what you want with it...
<?php
define(''STDIN'',fopen("php://stdin","r"));
//define(''STDIN'',fopen("dev/stdin","r"));
str = fgets(STDIN);
这篇关于Mail2PHP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文