本页主题: 可以使用gmail做smtp么 打印 | 加为IE收藏 | 复制链接 | 收藏主题 | 上一主题 | 下一主题

will
级别: 新手上路


精华: 0
发帖: 6
活跃度: 16 点
金钱: 60 RMB
贡献: 0 点
注册时间:2008-08-16
最后登录:2008-12-31

 可以使用gmail做smtp么

gmail的smtp服务器使用ssl加密,端口也和一般网站不同。但有openssl就可以访问,可是我用fsockopen("ssl://smtp.gmail.com",465,&$errno,&$errstr,60)的方式连接,结果失败。捌号能不能给个成功连接的方法?
顶端 Posted: 2008-09-30 16:10 | [楼 主]
HarbinBeer
级别: 管理员


精华: 1
发帖: 1301
活跃度: 2028 点
金钱: 10886 RMB
贡献: 0 点
注册时间:2006-10-10
最后登录:2009-01-09

 

我个人一直使用smtp.gmail.com:110这个普通smtp
没发现gmail必须要用ssl的说法
如果楼主一定要用ssl的,请仔细查阅gmail的帮助
顶端 Posted: 2008-09-30 18:22 | 1 楼
will
级别: 新手上路


精华: 0
发帖: 6
活跃度: 16 点
金钱: 60 RMB
贡献: 0 点
注册时间:2008-08-16
最后登录:2008-12-31

 

Gmail帮助里写:SMTP 服务器必须设置为使用 SSL (Outlook) 或 TLS (Thunderbird)。
http://mail.google.com/support/bin/answer.py?hl=cn&answer=44793
当然gmail里没有涉及php使用smtp端口的情况。

PHP手册中fsockopen函数中写道:As of PHP 4.3.0, if you have compiled in OpenSSL support, you may prefix the hostname with either 'ssl://' or 'tls://' to use an SSL or TLS client connection over TCP/IP to connect to the remote host.

110端口的非加密连接我试过了,貌似不可以,哈管可否短消息和我分享一下你使用普通SMTP写法?感激不尽。
顶端 Posted: 2008-10-03 14:04 | 2 楼
HarbinBeer
级别: 管理员


精华: 1
发帖: 1301
活跃度: 2028 点
金钱: 10886 RMB
贡献: 0 点
注册时间:2006-10-10
最后登录:2009-01-09

 

我的邮件客户端一直都用普通smtp链接,通过php原理是一样的吧。
还有默认gmail的pop和smtp都是关闭的,需要登录gmail.com然后开启,这个别忘了做
顶端 Posted: 2008-10-03 20:51 | 3 楼
will
级别: 新手上路


精华: 0
发帖: 6
活跃度: 16 点
金钱: 60 RMB
贡献: 0 点
注册时间:2008-08-16
最后登录:2008-12-31

 

我已经设置打开POP和SMTP,可以通过客户端收发邮件
现在的问题是通过ssl的方式连服务器都连不上,还未到验证用户的阶段
使用普通25端口连接方式可以连上,但是gmail服务器反馈信息说需要加密连接
唉……头疼头疼!!
顶端 Posted: 2008-10-03 22:44 | 4 楼
帖子浏览记录 版块浏览记录
捌号主机论坛 » 用户交流

Time now is:01-09 10:53, Gzip disabled 京ICP备06061602号
Powered by PHPWind v6.3.2 Certificate Code © 2003-08 PHPWind.com Corporation