可以使用cURL通过代理发送电子邮件 [英] Can cURL be used to send emails through a proxy

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

问题描述

我想从本地主机发送邮件.我通过我的研究所的代理(HTTP)连接到Internet,该代理需要身份验证.是否可以使用cURL发送邮件,因为到目前为止,我只看到cURL来获取网页.如果不是这样,请您指定其他替代方法吗?任何帮助都将不胜感激!

I would like to send mails from my localhost. I am connected to internet through my institute's proxy(HTTP) which requires authentication. Is it possible to use cURL to send mails, because so far i've seen it fetching webpages only. If not so, could you please specify any other alternatives? Any help is greatly appreciated!!

谢谢!

推荐答案

如果您需要使用Web界面发送邮件,则可以编写curl脚本以使用代理和网站:http://curl.haxx.se/docs/httpscripting.html

If you need to send mails using a web interface, you can script curl to use the proxy and the web site: http://curl.haxx.se/docs/httpscripting.html

如果要使用SMTP,curl也可以这样做.但是,它可能不是发送电子邮件的最佳工具.

If you want to use SMTP, curl can do that too. It might however not be the best tool out there for sending emails.

我认为没有人真正通过 HTTP 代理访问 SMTP,即使我认为您可以使用 curl 通过 HTTP 代理(使用 CONNECT)进行隧道传输(如果您真的愿意).

I don't think anyone truly access SMTP through HTTP proxy even if I think you can for example tunnel through a HTTP proxy (with CONNECT) using curl if you really want to.

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

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