I can't make the email function operate within PHPR v5.3 build 7113.
Recently I have started converting an ASPR application due to the increased performance inherent in PHP processing that used the built in email function which worked correctly under ASP v6.3 (build 7113). The same exact email settings did not work in PHPR.
I have created a rather simple test application that simply attempts to send the sample email to a user it always receive the ubiquitous message:
"mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set()"
This seems to imply that SMTP settings need to be set in the PHP.INI configuration file but I thought these values should be passed from the SECURITY - LOGIN Settings - Email section of PHPR as they were with ASPR. In fact the only way the SMTP values change is if they are modified in the PHP.INI
I noted that PHPR is using the classes provided from PHPMAILER under the libs\phpmailer output folder but even when I deleted those classes I do not receive an error message. It appears that the classes are not being included.
The test enviroment is as follows:
- Windows 7 (64bit version)
- IIS 7
- PHP v5.3
- SMTP EMail authentication tested with and without
[mail function]
; For Win32 only.
; http://php.net/smtp
SMTP = localhost
; http://php.net/smtp-port
smtp_port = 25
; For Win32 only.
; http://php.net/sendmail-from
; sendmail_from = me@example.com
; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
; http://php.net/sendmail-path
;sendmail_path =
; Force the addition of the specified parameters to be passed as extra parameters
; to the sendmail binary. These parameters will always replace the value of
; the 5th parameter to mail(), even in safe mode.
;mail.force_extra_parameters =
; Add X-PHP-Originating-Script: that will include uid of the script followed by the filename
; The path to a log file that will log all mail() calls. Log entries include
; the full path of the script, line number, To address and headers.
;mail.log =
Can anyone share a copy of their working PHP.INI file ?
Thanks in advance
John