Sending mail with PHPMailer through proxy?
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 allo开发者_高级运维w me to do this.
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?
Thank you
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.
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();
...
精彩评论