sendmail not working

Problems with the Windows version of XAMPP, questions, comments, and anything related.

sendmail not working

Postby brergo » 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;
# 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.
brergo
 
Posts: 8
Joined: 07. March 2009 02:36
Operating System: Windows XP

Re: sendmail not working

Postby WilliL » 27. December 2012 18:36

Code: Select all
user myemail@mydomain.com

are you sure that's your gmail user name?

config for sendmail seams to be ok.
check from, user, password for spelling errors.

It could also be, that gmail denies relaying (to beware spams)
Willi
WilliL
 
Posts: 660
Joined: 08. January 2010 10:54
Operating System: Win7Home Prem 64 SP1

Re: sendmail not working

Postby brergo » 27. December 2012 19:01

That isn't my gmail...i changed it for this post for security reasons...

As far as Gmail denying relaying, I have it working on the one server with another gmail account.
brergo
 
Posts: 8
Joined: 07. March 2009 02:36
Operating System: Windows XP

Re: sendmail not working

Postby WilliL » 28. December 2012 11:02

did you tried the working gmail account with all parameters as hosted?
may be that relaying by xampp is classified in an other way then relaying by a hoster.
Willi
WilliL
 
Posts: 660
Joined: 08. January 2010 10:54
Operating System: Win7Home Prem 64 SP1

Re: sendmail not working

Postby brergo » 29. December 2012 01:38

Not sure what you mean, can you clarify?

WilliL wrote:did you tried the working gmail account with all parameters as hosted?
may be that relaying by xampp is classified in an other way then relaying by a hoster.
brergo
 
Posts: 8
Joined: 07. March 2009 02:36
Operating System: Windows XP

Re: sendmail not working

Postby brergo » 01. January 2013 00:37

Anyone?
brergo
 
Posts: 8
Joined: 07. March 2009 02:36
Operating System: Windows XP

Re: sendmail not working

Postby bprsk8r4272 » 02. January 2013 19:30

this is what im using
php.ini
Code: Select all
[mail function]
; XAMPP: Comment out this if you want to work with an SMTP Server like Mercury
SMTP = localhost
smtp_port = 25

; For Win32 only.
; http://php.net/sendmail-from
;sendmail_from = postmaster@localhost

; 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"


then the sendmail.ini
Code: Select all
# 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

# A freemail service example
account ********
tls on
tls_certcheck off
host smtp.gmail.com
from ***********@gmail.com
auth on
user **********@gmail.com
password *****************************

# Set a default account
account default : **********


i use the sendmail from xampp 1.7.3 and used it on versions 1.7.7 and 1.8.1
bprsk8r4272
 
Posts: 22
Joined: 29. December 2010 00:20
Location: Rochester, Ny
Operating System: Windows 10 Pro 64-bit

Re: sendmail not working

Postby brergo » 07. January 2013 02:38

Will try those settings tomorrow
brergo
 
Posts: 8
Joined: 07. March 2009 02:36
Operating System: Windows XP

Re: sendmail not working

Postby rajj » 07. January 2013 12:11

hello friend after 1 week of tension , it has been working thanx a lot friend :D :D :D 8) 8) 8) 8)
rajj
 
Posts: 1
Joined: 07. January 2013 12:09
Operating System: Windows 7


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 129 guests