直接访问SMTP而不是使用mail() [英] Accessing SMTP direct instead of using mail()
问题描述
我的共享网络主机已经进行了某种升级..某些东西..
支持技术无法告诉我什么。这是一个cPanel系统,包含所有
常规内容。该网站是一个俱乐部网站。
多年来,我一直在使用常规旧邮件(...)功能来发送广播消息对会员昨天,
失败了。主持人现在告诉我需要使用有效的电子邮件帐户和密码直接访问SMTP服务器,
。 这是一项新的安全措施
,以防止发送垃圾邮件。去找一个脚本,是技术人员的回复。
我找到了一个,在:
http://us3.php.net/manual/en/ref.mail.php
2 / 3rds下来,搜索页面:
josephcmiller2在gmail dot com
端口25无法正常工作;科技终于告诉我尝试端口587.那个
有帮助。他说,不需要身份验证。然而,脚本失败
at:
//你好...
fputs($ cp," HELO "。$ GLOBAL [" SMTP_SERVER"]。" \\\\ nn");
$ res = fgets($ cp,256);
if(substr($ res,0,3)!=" 250")返回无法介绍;
......我不知道该怎么做之后呢。 $ GLOBAL [" SMTP_SERVER"]
包含服务器的名称,(mail.example.com)适用于
前面的fsockopen()代码HELO线。任何想法,伙计们?
-
-bts
-朋友不要让朋友驾驶Windows
My shared web host has made some sort of upgrade to .. something .. the
support tech can''t tell me what. It''s a cPanel system, with all the
regular stuff. The site is a club site.
For years, I have been using the regular old mail(...) function for
things like sending broadcast messages to members. Yesterday, that
failed. The host now tells me I need to access the SMTP server directly,
using a valid email account and password. "It''s a new security measure
to prevent spamming. Go find a script," was the tech''s reply.
I found one, at:
http://us3.php.net/manual/en/ref.mail.php
2/3rds down, search the page for:
josephcmiller2 at gmail dot com
Port 25 doesn''t work; the tech finally told me to try port 587. That
helps. No authentication is required, he said. However, the script fails
at:
// Say hello...
fputs($cp, "HELO ".$GLOBAL["SMTP_SERVER"]."\r\n");
$res=fgets($cp,256);
if(substr($res,0,3) != "250") return "Failed to Introduce";
...and I don''t know what to do after that. $GLOBAL["SMTP_SERVER"]
contains the name of the server, ("mail.example.com") which works for
the fsockopen() code preceding the HELO lines. Any ideas, folks?
--
-bts
-Friends don''t let friends drive Windows
推荐答案
cp," HELO"。
cp, "HELO ".
GLOBAL [" SMTP_SERVER"]。" \ r \ n");
GLOBAL["SMTP_SERVER"]."\r\n");
res = fgets(
res=fgets(
这篇关于直接访问SMTP而不是使用mail()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!