sendmail not working
Posted: 27. December 2012 14:43
I have literally spent several hours scouring forums, etc. for how to set up sendmail when using XAMPP. On my one system I got it working (the older versions of XAMPP and PHP). On another system, using the exact same setting/config, it won't work. Here is a comparison of the systems' specs, the working one being the one on the left:
Win XP SP3..........Win 7 Pro 64-bit
XAMPP 1.7.3.........XAMPP 1.8.0
PHP 5.3.1............PHP 5.4.4
Here is the sendmail.ini file;
And here is the mail_function settings in php.ini:
In the log file, I find this:
Any assistance would be greatly appreciated. Thanks.
Win XP SP3..........Win 7 Pro 64-bit
XAMPP 1.7.3.........XAMPP 1.8.0
PHP 5.3.1............PHP 5.4.4
Here is the sendmail.ini file;
# Example for a user configuration file
# Set default values for all following accounts.
defaults
logfile "C:\xampp\sendmail\sendmail.log"
# Mercury
account Mercury
host localhost
from postmaster@localhost
auth off
# Gmail
account Gmail
tls on
port 587
tls_certcheck off
host smtp.gmail.com
from myemail@mydomain.com
auth on
user myemail@mydomain.com
password ********
# Set a default account
account default : Gmail
And here is the mail_function settings in php.ini:
[mail function]
; XAMPP: Comment out this if you want to work with an SMTP Server like Mercury
SMTP = smtp.gmail.com
smtp_port = 587
mail.log = "C:\xampp\sendmail\sendmail.log"
; For Win32 only.
; http://php.net/sendmail-from
sendmail_from = myemail@mydomain.com
; XAMPP IMPORTANT NOTE (1): If XAMPP is installed in a base directory with spaces (e.g. c:\program filesC:\xampp) fakemail and mailtodisk do not work correctly.
; XAMPP IMPORTANT NOTE (2): In this case please copy the sendmail or mailtodisk folder in your root folder (e.g. C:\sendmail) and use this for sendmail_path.
; XAMPP: Comment out this if you want to work with fakemail for forwarding to your mailbox (sendmail.exe in the sendmail folder)
sendmail_path = "\"C:\xampp\sendmail\sendmail.exe\" -t"
; XAMPP: Comment out this if you want to work with mailToDisk, It writes all mails in the C:\xampp\mailoutput folder
; sendmail_path = "C:\xampp\mailtodisk\mailtodisk.exe"
In the log file, I find this:
mail() on [C:\xampp\htdocs\cpin\modules\mod_s5_quick_contact\tmpl\default.php:137]: To: myemail@mydomain.org -- Headers: From: Brian<xxxxx@gmail.com>
Any assistance would be greatly appreciated. Thanks.