Page 1 of 1

Sendmail??

PostPosted: 13. April 2009 00:02
by dec913
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

Re: Sendmail??

PostPosted: 13. April 2009 01:07
by Sharley
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.

Re: Sendmail??

PostPosted: 14. April 2009 12:02
by dec913
Brilliant. Works a treat now... must of done this last time, but just didn't remember.

Thanks again.

Re: Sendmail??

PostPosted: 12. February 2011 12:48
by WilliL
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.

Re: Sendmail??

PostPosted: 15. February 2011 19:51
by gijs007
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

Re: Sendmail??

PostPosted: 15. February 2011 21:01
by WilliL
try to comment out pop3 part AND activate debug.log and error.log- it will help

Re: Sendmail??

PostPosted: 15. February 2011 21:28
by Sharley
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.

Re: Sendmail??

PostPosted: 16. February 2011 20:34
by gijs007
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=

Re: Sendmail??

PostPosted: 16. February 2011 20:42
by gijs007
its working now, had to ; the pop settings.
thanks for the support guys.

Re: Sendmail??

PostPosted: 17. February 2011 00:04
by Sharley
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.

Re: Sendmail??

PostPosted: 19. March 2017 22:55
by Pkw
About the answer Post by Sharley ยป 12. April 2009 19:07
RE: The how to configure sendmail.
Thanks Sharley - You answer prompted me to join this forum so I could
to thank you.

The truly great thing about Sharley's post is the syntax.
I went over quite a few posts with "how To" configure sendmail
The posts appeared to be written by a person who assumed the
person on the other end had enough savvy to decipher the clues.
Exact syntax IMO is the difference between understanding and confusion.
I'm sure the person who posted he/she was sent spinning, had run into the same confusing
how to posts as me.
Sharley, on the othger hand, provided clear concise syntax that worked
FIRST TIME

Cheers,
Pkw

Re: Sendmail??

PostPosted: 23. March 2017 11:41
by xhevdet.pllana
Hi,
After configuration mercurymail.ini and sendmail.ini I have this mesage from Mercury:
Image