PHP Mail function from behind a proxy
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
精彩评论