通过代理通过PHPMailer发送邮件? [英] Sending mail with PHPMailer through proxy?

查看:61
本文介绍了通过代理通过PHPMailer发送邮件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试通过SMTP代理使用PHPMailer发送电子邮件,但是无法在PHPMailer中找到字段或函数来允许我这样做.

I am trying to send an e-mail with PHPMailer through a SMTP proxy but am not able to find a field or function in PHPMailer to allow me to do this.

也许您可以帮帮我吗?如果PHPMailer不支持此功能,那么您可以向我推荐一个免费的邮件程序,它可以吗?

Maybe you can help me out? If PHPMailer doesn't have support for this maybe you can recommend me a free mailer program which does?

谢谢

推荐答案

没有SMTP代理之类的东西-只有端口转发器(有时称为Null邮件程序)和SMTP中继.可以通过HTTP和SOCKS代理路由任意端口/协议-但是开箱即用的任何产品均不支持AFAIK.

There's no such thing as an SMTP proxy - only port forwarders (sometimes refered to as Null mailers) and SMTP relays. It is possible to route arbitrary ports/protocols through HTTP and SOCKS proxies - but AFAIK that's not supported by any products out of the box.

对于端口转发器和SMTP中继,只需告诉phpmailer使用的主机和端口即可.

For both port forwarders and SMTP relays, it's just a matter of telling phpmailer the host and port to use:

 ...
 $mua = new PHPMailer();
 ...
 $mua->Host = 'my-smtp-relay.example.com';
 $mua->Port = '2525';
 ...
 $mua->Send();
 ...

这篇关于通过代理通过PHPMailer发送邮件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆