2

I am trying to use the php mail() function. I am using a remote mail server w/ port 25, which I can telnet to and it connects just fine. I have configured my php.ini with these settings and have also tried ini_set(), but I get this error:

PHP Warning:  mail(): Failed to connect to mailserver at xxx.xx.xx.xxx; port 25, verify your "SMTP"; and "smtp_port"; setting in php.ini or use ini_set() in D:\....php on line 23

Any help is very appreciated! I am using Windows Server 2008, Apache 2.2, and PHP 5.2.17

Juliet
  • 1,040
  • 3
  • 11
  • 18

2 Answers2

2

As far as I know, PHP's built-in mail function has some issues with SMTP authentication. Maybe you want to try PEAR mail package or other mailers.

bleda
  • 115
  • 5
1

Only PHPMailer helped me. mail() didn't work with

smtp: mail.*******.com
port: 2525
auth: off

while telent mail.*******.com 2525 worked and did send emails

vladkras
  • 16,483
  • 4
  • 45
  • 55