开发者

PHP Mail function from behind a proxy

开发者 https://www.devze.com 2023-02-09 11:14 出处:网络
I do not know too many details except that I acces开发者_运维知识库s the internet from behind a proxy server (I have the IP and port)

I do not know too many details except that I acces开发者_运维知识库s the internet from behind a proxy server (I have the IP and port) and that I'm running PHP out of localhost (using WAMP) The mail() isn't able to send emails.

Really new to PHP, so would appreciate help fixing this.


Do you have access to the php.ini file or the ability to override php.ini settings with the ini_set function?

Then you can try and override the SMTP settings and replace it with for example your ISP settings: http://www.php.net/manual/en/mail.configuration.php#ini.smtp

Apparently you can't set a username/password if required by the SMTP server. So you probably have to use a third-party e-mail library. Try Swift: http://swiftmailer.org/

Or check this post with a similar question: php.ini & SMTP= - how do you pass username & password

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号