Sendmail??

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

Sendmail??

Postby dec913 » 13. April 2009 00:02

Having recently had to replace the server, and installed Xammp 1.7. I seem unable to send emails... it worked before (from Clickcart), but I don't remember having to do any tweaks! Today I've installed Mambo, and whilst testing, during the new user registration, it should send an email to confirm but nothing. Not had the chance to reinstall clickcart yet, but I guess that would be the same.

Any quick clues, doing a forum search has just sent me round in circles really!

Thanks
dec913
 
Posts: 10
Joined: 17. April 2008 12:19

Re: Sendmail??

Postby Sharley » 13. April 2009 01:07

This is the relevant section of the xampp\apache\bin\php.ini file that requires your input using a text editor like Notepad:
[mail function]
; For Win32 only.
SMTP = smtp.myisp.com <--add here your ISP email server that you use in your normal email client.
smtp_port = 25 <--normally port 25 but change to the one provided by your ISP if different.

; For Win32 only.
;sendmail_from = me@example.com <--uncomment this line and add your email address.

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


Now if your ISP requires authentication before you can send email and most do, then you have to dispense with the sections ;For Win32 only (leave as the defaults or comment out the lines) and use the For Unix only section by uncommenting the line ;sendmail_path=" " - the above path example is from my default 1.7.0 XAMPP installation.

Then go to C:\xampp\sendmail\ and find the sendmail.ini file and using a text editor fill in the required fields from your ISP email details.
For example:
; configuration for fake sendmail

; if this file doesn't exist, sendmail.exe will look for the settings in
; the registry, under HKLM\Software\Sendmail

[sendmail]

; you must change mail.mydomain.com to your smtp server,
; or to IIS's "pickup" directory. (generally C:\Inetpub\mailroot\Pickup)
; emails delivered via IIS's pickup directory cause sendmail to
; run quicker, but you won't get error messages back to the calling
; application.

smtp_server=smtp.myisp.com <--add your ISP's email server.

; smtp port (normally 25)

smtp_port=25 <-- usually port 25 is fine but replace if your ISP has given you another port to use.

; the default domain for this server will be read from the registry
; this will be appended to email addresses when one isn't provided
; if you want to override the value in the registry, uncomment and modify

;default_domain=local

; log smtp errors to error.log (defaults to same directory as sendmail.exe)
; uncomment to enable logging

;error_logfile=error.log <--uncomment this for an error log file in the sendmail folder.

; create debug log as debug.log (defaults to same directory as sendmail.exe)
; uncomment to enable debugging

;debug_logfile=debug.log <--uncomment this if you want to see debug info in the sendmail folder.

; if your smtp server requires authentication, modify the following two lines

;auth_username= <--uncomment this and add your email username from your ISP.
;auth_password= <--uncomment this and add your email password from your ISP.

; if your smtp server uses pop3 before smtp authentication, modify the
; following three lines

;pop3_server=
;pop3_username=
;pop3_password=

; to force the sender to always be the following email address, uncomment and
; populate with a valid email address. this will only affect the "MAIL FROM"
; command, it won't modify the "From: " header of the message content

;force_sender=me@localhost <--uncomment this and add your email address from your ISP.

; sendmail will use your hostname and your default_domain in the ehlo/helo
; smtp greeting. you can manually set the ehlo/helo name if required

;hostname=localhost

Configure one or the other in the php.ini file but not both or you may have issues.

Configure your scripts to either use sendmail or the Win32 only mail function.

Always save .ini files and restart Apache to have the edits recognized.

Let me know back please if there is anything that is not clear and if you finally come to rest after your search induced spin out and your email gets through.
Thanks.
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Sendmail??

Postby dec913 » 14. April 2009 12:02

Brilliant. Works a treat now... must of done this last time, but just didn't remember.

Thanks again.
dec913
 
Posts: 10
Joined: 17. April 2008 12:19

Re: Sendmail??

Postby WilliL » 12. February 2011 12:48

hi Sharley,
thanks for your hint.. works also fine on XAMPP 174
Sharley wrote:For example:
; configuration for fake sendmail

; if your smtp server requires authentication, modify the following two lines

;auth_username= <--uncomment this and add your email username from your ISP.
;auth_password= <--uncomment this and add your email password from your ISP.

; if your smtp server uses pop3 before smtp authentication, modify the
; following three lines

;pop3_server=
;pop3_username=
;pop3_password=

I tried with 'smtp server uses pop3 before smtp authentication' connection first, same configuration as my mail accounts but it didn't work. There seems to be an issue in HELO/EHLO - information from debug.log
After changing sendmail.ini to your suggestion ' smtp server requires authentication' ist works fine.
Willi
WilliL
 
Posts: 661
Joined: 08. January 2010 10:54
Operating System: Win7Home Prem 64 SP1

Re: Sendmail??

Postby gijs007 » 15. February 2011 19:51

its not working for me, id like to use gmail as smtp server for sending activation mails for joomla and phpbb.
I tried send mail and php mail function aswell as the included smtp settings, but I do not receive the emails.

my sendmail ini looks like this:

; configuration for fake sendmail

; if this file doesn't exist, sendmail.exe will look for the settings in
; the registry, under HKLM\Software\Sendmail

[sendmail]

; you must change mail.mydomain.com to your smtp server,
; or to IIS's "pickup" directory. (generally C:\Inetpub\mailroot\Pickup)
; emails delivered via IIS's pickup directory cause sendmail to
; run quicker, but you won't get error messages back to the calling
; application.

smtp_server=smtp.gmail.com

; smtp port (normally 25)

smtp_port=465

; the default domain for this server will be read from the registry
; this will be appended to email addresses when one isn't provided
; if you want to override the value in the registry, uncomment and modify

;default_domain=local

; log smtp errors to error.log (defaults to same directory as sendmail.exe)
; uncomment to enable logging

;error_logfile=error.log

; create debug log as debug.log (defaults to same directory as sendmail.exe)
; uncomment to enable debugging

;debug_logfile=debug.log

; if your smtp server requires authentication, modify the following two lines

auth_username=noreplyxgclan@gmail.com
auth_password=mypassword

; if your smtp server uses pop3 before smtp authentication, modify the
; following three lines

pop3_server=pop.gmail.com
pop3_username=noreplyxgclan@gmail.com
pop3_password=mypassword

; to force the sender to always be the following email address, uncomment and
; populate with a valid email address. this will only affect the "MAIL FROM"
; command, it won't modify the "From: " header of the message content

force_sender=noreplyxgclan@gmail.com

; sendmail will use your hostname and your default_domain in the ehlo/helo
; smtp greeting. you can manually set the ehlo/helo name if required

;hostname=localhost
gijs007
 
Posts: 4
Joined: 15. February 2011 19:45

Re: Sendmail??

Postby WilliL » 15. February 2011 21:01

try to comment out pop3 part AND activate debug.log and error.log- it will help
Willi
WilliL
 
Posts: 661
Joined: 08. January 2010 10:54
Operating System: Win7Home Prem 64 SP1

Re: Sendmail??

Postby Sharley » 15. February 2011 21:28

Gmail on port 465 is the encrypted port and so would require the libraries to be in the sendmail folder.

The sendmail content in 1.7.4 is out of date so you would need to download and extract the newer version and replace the old version, the new version contains the libraries and an improved sendmail.ini file to configure the SSL component.
http://www.glob.com.au/sendmail/sendmail.zip

Having just read up on this it now seems that gmail has recently (march 2010) changed the way this all works with a possible fix if the above new version of sendmail does not work with gmail either.
Fix for fake sendmail error: Error connecting with SSL

They have discarded the insecure SSL v2 for SSL v3 or is it now known as TLS1 so not having a gmail account I can't test if the new sendmail version with SSL still works after the change - perhaps you can test it and report back for the rest of us. :)

Please, as pointed out by Will, uncomment the error.log and debug.log file so that you can see why things are not working.
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Sendmail??

Postby gijs007 » 16. February 2011 20:34

joomla 1.6 says:
* Could not execute: /usr/sbin/sendmail

Warning

* Registration failed: An error was encountered while sending the registration email. A message has been sent to the administrator of this site.

I downloaded the new send mail, and configured it like this:

; configuration for fake sendmail

; if this file doesn't exist, sendmail.exe will look for the settings in
; the registry, under HKLM\Software\Sendmail

[sendmail]

; you must change mail.mydomain.com to your smtp server,
; or to IIS's "pickup" directory. (generally C:\Inetpub\mailroot\Pickup)
; emails delivered via IIS's pickup directory cause sendmail to
; run quicker, but you won't get error messages back to the calling
; application.

smtp_server=smtp.gmail.com

; smtp port (normally 25)

smtp_port=465

; SMTPS (SSL) support
; auto = use SSL for port 465, otherwise try to use TLS
; ssl = alway use SSL
; tls = always use TLS
; none = never try to use SSL

smtp_ssl=auto

; the default domain for this server will be read from the registry
; this will be appended to email addresses when one isn't provided
; if you want to override the value in the registry, uncomment and modify

default_domain=gmail.com

; log smtp errors to error.log (defaults to same directory as sendmail.exe)
; uncomment to enable logging

error_logfile=error.log

; create debug log as debug.log (defaults to same directory as sendmail.exe)
; uncomment to enable debugging

debug_logfile=debug.log

; if your smtp server requires authentication, modify the following two lines

auth_username=noreplyxgclan@gmail.com
auth_password=mypassword

; if your smtp server uses pop3 before smtp authentication, modify the
; following three lines. do not enable unless it is required.

pop3_server=pop.gmail.com
pop3_username=noreplyxgclan@gmail.com
pop3_password=mypassword
; force the sender to always be the following email address
; this will only affect the "MAIL FROM" command, it won't modify
; the "From: " header of the message content

force_sender=noreplyxgclan@gmail.com

; force the sender to always be the following email address
; this will only affect the "RCTP TO" command, it won't modify
; the "To: " header of the message content

force_recipient=

; sendmail will use your hostname and your default_domain in the ehlo/helo
; smtp greeting. you can manually set the ehlo/helo name if required

hostname=
gijs007
 
Posts: 4
Joined: 15. February 2011 19:45

Re: Sendmail??

Postby gijs007 » 16. February 2011 20:42

its working now, had to ; the pop settings.
thanks for the support guys.
gijs007
 
Posts: 4
Joined: 15. February 2011 19:45

Re: Sendmail??

Postby Sharley » 17. February 2011 00:04

gijs007 wrote:its working now
That's good to hear as now the latest version of fake sendmail should be able to send encrypted email from web forms without too much hassle - used to be a configuration nightmare with no guarantee the configurations would actually work.

Thanks for the feedback.

Best wishes.
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 55 guests