Page 1 of 1

Sendmail won't work :--(

PostPosted: 07. October 2011 19:55
by usar
i am trying to use the email functionality in XAMPP but haven't had much success with it so far. This is the first time i am using it. Below are my Sendmail.ini and php.ini [sendmail function] files. the smtp_server is pointing to a domino server. what am i doing wrong ? any help would be appreciated.

i also tried the testmail.php as described in this thread: http://community.apachefriends.org/f/viewtopic.php?f=16&p=173315#p173315 but no luck. it is also odd that i cannot see any of the files being created (the debug or the error files?!!).

Sendmail.ini:

Code: Select all
# Example for a user configuration file

# Set default values for all following accounts.
defaults
logfile "F:\VIT_NA\xampp\sendmail\sendmail.log"

smtp_server=10.21.43.133
smtp_port=25

error_logfile=error.log


php.ini:
Code: Select all
[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 = postmaster@localhost

; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
; http://php.net/sendmail-path
sendmail_path = "\"F:\VIT_NA\xampp\sendmail\sendmail.exe\" -t"

; 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
mail.add_x_header = Off

Re: Sendmail won't work :--(

PostPosted: 07. October 2011 22:34
by Sharley
We require your XAMPP version and your Windows Version to provide the correct version support.
viewtopic.php?f=16&t=48331
viewtopic.php?f=16&t=32670

Thanks.

Re: Sendmail won't work :--(

PostPosted: 14. October 2011 18:15
by usar
Sharley wrote:We require your XAMPP version and your Windows Version to provide the correct version support.
http://community.apachefriends.org/f/viewtopic.php?f=16&t=48331
http://community.apachefriends.org/f/viewtopic.php?f=16&t=32670

Thanks.


Sorry, here you go: Win XP Professional with SP3. XAMPP version is XamppWin32-1.7.3

i found other threads with the similar problem and tried to follow the suggestions but that did not help (one of the threads i mentioned in my previous post). i need an expert set of eyes to tell me what i might be doing wrong. :--)

What do you think ?

Thx.

Re: Sendmail won't work :--(

PostPosted: 14. October 2011 22:16
by Sharley
Thanks for the version info. 8)
1.7.3 version has a different sendmail binary to 1.7.7 (latest XAMPP version) and so you may appreciate now why we ask for the version info in every topic started and if replying in a topic that a member did not start.

Your full sendmail ini would be of more help so I can see all the settings - just obfuscate any sensitive information.

You are using a local network IP address in the default for all account smtp_server settings where this setting should be your ISP email server setting and will override the Account default settings - the settings in the sendmail ini usually reflect the settings in your normal email client for example those in Outlook Express, usually provided by your ISP.

You can comment out this line in the php.ini file so it looks like the following code which often helps if there are sending issues
Code: Select all
[mail function];SMTP = localhost


That post you referred to did solve thee OP's issue and it contains some very comprehensive and detailed settings information.

Best wishes. :)

Re: Sendmail won't work :--(

PostPosted: 17. October 2011 20:51
by usar
Hi Sharley -

so here is my complete sendmail.ini file:

Code: Select all
# Example for a user configuration file

# Set default values for all following accounts.
defaults
logfile "F:\XX_XX\xampp\sendmail\sendmail.log"

smtp_server=10.21.43.133
smtp_port=25

error_logfile=error.log


my company uses lotus for email. 10.21.43.133 is the address for the domino server. [[on a side note, on a different setup/different purpose/different development environment, i am using the same smto_server address and port and it works.]]

i did the change you suggested (comment out SMTP = localhost). i still don't get an email. logs are also not created in the sendmail folder (as indicated in the sendmail.ini file) which is odd..it should at least create an error file or the log file. :?

Right now, i tested the email by using the feature 'Email new password' with a test account. i don't get an error but neither do i receive an email. Here is the msg i get after clicking the 'Email new password' button:

A new password has been sent to the e-mail address registered for "Test2". Please log in again after you receive it

Re: Sendmail won't work :--(

PostPosted: 17. October 2011 23:08
by JonB
I think the 'account' field and some others are required

try it like this
sendmail.ini

Code: Select all
account Domino
host 10.21.43.133
auth = off
error_logfile=error.log

account default:  Domino



This next is from a WORKING XAMPP 1.7.3 server using an unauthenticated (open) SMTP server on port 25 (but on a closed network)

sendmail.ini
Code: Select all
#IJ
account IJ
host smtp.ij.net
from jonb@xxxyyyzzz.com
auth off

account default : IJ


php.ini

Code: Select all
[mail function]
sendmail_path = "\xampp\sendmail\sendmail.exe -t"
mail.add_x_header = Off

[SQL]


Good Luck
8)

Re: Sendmail won't work :--(

PostPosted: 18. October 2011 16:15
by usar
JonB wrote:I think the 'account' field and some others are required

try it like this
sendmail.ini

Code: Select all
account Domino
host 10.21.43.133
auth = off
error_logfile=error.log

account default:  Domino



This next is from a WORKING XAMPP 1.7.3 server using an unauthenticated (open) SMTP server on port 25 (but on a closed network)

sendmail.ini
Code: Select all
#IJ
account IJ
host smtp.ij.net
from jonb@xxxyyyzzz.com
auth off

account default : IJ


php.ini

Code: Select all
[mail function]
sendmail_path = "\xampp\sendmail\sendmail.exe -t"
mail.add_x_header = Off

[SQL]


Good Luck
8)


still no luck [no log being generated or email being received] :--( Here is what i have:

sendmail.ini

Code: Select all
# Example for a user configuration file

# Set default values for all following accounts.
defaults
logfile "F:\VIT_NA\xampp\sendmail\sendmail.log"

#smtp_server=10.21.43.133
#smtp_port=25

account Domino
host 10.21.43.133
auth = off
error_logfile=error.log

account default: Domino


php.ini:

Code: Select all
[mail function]
; For Win32 only.
; http://php.net/smtp
;SMTP = 10.21.43.133
; http://php.net/smtp-port
;smtp_port = 25

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

; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
; http://php.net/sendmail-path
sendmail_path = "\"F:\XX_XX\xampp\sendmail\sendmail.exe\" -t"

; 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
mail.add_x_header = Off

; Log all mail() calls including the full path of the script, line #, to address and headers
;mail.log = "F:\XX_XX\xampp\apache\logs\php_mail.lo
g"

Re: Sendmail won't work :--(

PostPosted: 18. October 2011 16:18
by usar
JonB wrote:I think the 'account' field and some others are required

try it like this
sendmail.ini

Code: Select all
account Domino
host 10.21.43.133
auth = off
error_logfile=error.log

account default:  Domino



This next is from a WORKING XAMPP 1.7.3 server using an unauthenticated (open) SMTP server on port 25 (but on a closed network)

sendmail.ini
Code: Select all
#IJ
account IJ
host smtp.ij.net
from jonb@xxxyyyzzz.com
auth off

account default : IJ


php.ini

Code: Select all
[mail function]
sendmail_path = "\xampp\sendmail\sendmail.exe -t"
mail.add_x_header = Off

[SQL]


Good Luck
8)


still no luck [no log being generated or email being received] :--( Here is what i have:

sendmail.ini

Code: Select all
# Example for a user configuration file

# Set default values for all following accounts.
defaults
logfile "F:\VIT_NA\xampp\sendmail\sendmail.log"

#smtp_server=10.21.43.133
#smtp_port=25

account Domino
host 10.21.43.133
auth = off
error_logfile=error.log

account default: Domino


php.ini:

Code: Select all
[mail function]
; For Win32 only.
; http://php.net/smtp
;SMTP = 10.21.43.133
; http://php.net/smtp-port
;smtp_port = 25

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

; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
; http://php.net/sendmail-path
sendmail_path = "\"F:\XX_XX\xampp\sendmail\sendmail.exe\" -t"

; 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
mail.add_x_header = Off

; Log all mail() calls including the full path of the script, line #, to address and headers
;mail.log = "F:\XX_XX\xampp\apache\logs\php_mail.log"

Re: Sendmail won't work :--(

PostPosted: 18. October 2011 18:23
by JonB
this:

sendmail_path = "\xampp\sendmail\sendmail.exe -t"

does NOT look like this

sendmail_path = "\"F:\XX_XX\xampp\sendmail\sendmail.exe\" -t"

The sendmail path is a path within the server root NOT the filesystem.

MINE does not say:
sendmail_path ="\"c:\xampp\sendmail\sendmail.exe\" -t"

8)




ytsf

Re: Sendmail won't work :--(

PostPosted: 18. October 2011 23:10
by Sharley
JonB wrote:this:
sendmail_path = "\xampp\sendmail\sendmail.exe -t"
does NOT look like this
sendmail_path = "\"F:\XX_XX\xampp\sendmail\sendmail.exe\" -t"
The sendmail path is a path within the server root NOT the filesystem.
MINE does not say:
sendmail_path ="\"c:\xampp\sendmail\sendmail.exe\" -t"
In both 1.7.3 and the latest 1.7.7 versions the path is set during installation either by the installer version (suspect) or the setup_xampp.bat file in the archive version.

In 1.7.3 it is possible to run the setup_xampp.bat file any time after installation to adjust settings and paths but in later versions running it again usually gives a "nothing to do" message.

I only use the Archive versions so I use the setup bat file in all of my many installed XAMPP versions and it adds the path to sendmail like so:
Code: Select all
sendmail_path ="\"c:\xampp\sendmail\sendmail.exe\" -t"
The portable USB installation does not add the drive letter path for obvious reasons.
Code: Select all
sendmail_path = "\xampp\sendmail\sendmail.exe -t"
As far as I can tell and assuming you don't have an issue with the absolute path then having either in the php.ini should not affect the OP's issue.

I am sure of one thing, the OP did not add that full path to the php.ini file.

Re: Sendmail won't work :--(

PostPosted: 19. October 2011 15:49
by usar
Jon/Sharley,

i did change the path name as per Jon's suggestion (see below)..still no luck though. i wonder if it really is a path issue since the log files are not being generated either. Note that the server [location of XAMPP folder (F drive)] is running from an external hard drive connected to a PC.


Code: Select all
[mail function]
; For Win32 only.
; http://php.net/smtp
;SMTP = 10.21.43.133
; http://php.net/smtp-port
;smtp_port = 25

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

; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
; http://php.net/sendmail-path
sendmail_path = "\xampp\sendmail\sendmail.exe\" -t"

; 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
mail.add_x_header = Off

; Log all mail() calls including the full path of the script, line #, to address and headers
mail.log = "F:\XX_XX\xampp\apache\logs\php_mail.log"

Re: Sendmail won't work :--(

PostPosted: 19. October 2011 15:53
by usar
Sharley wrote:I am sure of one thing, the OP did not add that full path to the php.ini file.


Previously, i had the full path:

Code: Select all
sendmail_path = "\"F:\XX_XX\xampp\sendmail\sendmail.exe\" -t"


XX_XX = label name of the hard drive

Re: Sendmail won't work :--(

PostPosted: 19. October 2011 21:39
by Sharley
usar wrote:Note that the server [location of XAMPP folder (F drive)] is running from an external hard drive connected to a PC.
This may well be the cause.

I don't think you need to add the label name to your sendmail, or any path really, just use the full path minus the label name and test again.

Make sure that this drive has full permissions for the user logged into your PC and best always to be logged in as the administrator when running a web server suite.


Please go to the user control panel and in the profile settings add your XAMPP Version and Operating System for future reference.
viewtopic.php?f=16&t=48626

Thanks and Best wishes. :)