I finally got the mail notification to work. There were a number of problems.
I modified the email script by turning on msntp --debug and writing the results to a log file. This finally allowed me to figure it all out.
Hostgator needs lots of things setup correctly:
AUTH = LOGIN (nothing else works)
You must have a valid account in the mail From: field. It is vital that the header data be valid, not just the --from parameter. I had to create a subdomain and account to match the fields setup by the email script. admin@HOSTNAME.NICDOMAIN. (I was baffled for a while on why my test e-mails from the command line were being rejected. It was because I was not setting the From: field in the test message itself.)
You cannot have a '+' in the login name, it gets converted to a ' '.
Andreas - Thanks for all the help on this. I would have never figured it out without you and your modules.
your welcome and I'm happy that your e-mails are now accepted by your provider....
So what are your conclusions precisely? Are there any modifications needed for the email script? This is still not clear to me....
And sorry about the "From:" field in the e-mail, I should have you told about that - some providers (maybe most of them) rely on that fields to be valid.
Depending on your answers there are still two basic tasks to do: 1) Write Thecus what modification the email script might need. 2) Write a summary for the Thecus Wiki on how to trace problems and what configuration settings might help to get e-mail working for a specific provider.
I spent quite a bit of time trying to get the e-mail notification working. The biggest problem I found was that the both the 'SMTP account ID' AND the 'From' field in the mail header had to be validatable by my hosting provider to allow it to accept my e-mails.
Also, a '+' sign in the account ID gets converted to a ' ' so you cannot have an account name with a + character.
I finally figured all this out by shadowing the your email script so I could modify it and using the --debug flag on msmtp and writing the results to a temporary log file. I had to add a subdomain and account to my domain for this all to work.
If you made the following changes to your notification scheme I could have had this debugged very quickly.
Add a 'From:' field to allow me to set the from field to what ever I wanted. That way I would not need to make special accommodations to my website to support the server.
Don't strip + from the account ID (or have a list of invalid characters)
Have a 'Show Log' checkbox near the 'TEST' button that when checked would run the script (msmtp) with --debug and redirect the results to a temporary log file that is then show in a 'test results' window on the browser. This file could be created with '>' so it would only hold the last 'TEST' and there would not be a problem with the file growing large.
I think #3 is the most important. It would help *anybody* debug mail problems.
Keep the firmware updates coming they are big improvements in every version. Also please keep supporting the installable modules, I would have never gotten this working without them. I would be happy to update your wiki. Where would you like me to post the info?
I have also gotten my email notifications to work by following the pointer provided by Andreas.
I discovered that the "SMTP server" is also used as the mail server for emails. I need to set it properly to point to my mail server. Also, the hostname and domain name must be valid in the network in order for emails to work.