- As part of an event, action or condition
- If the battery of devices is empty
- If the temperature of a harddisk monitored through HDDTemp is too high
This module uses the Simple Mail Transfer Protocol (SMTP) which is a fairly standard way for posting email.
E-mail can be set up using Modules -> E-mail:
- The SMTP Server should be the SMTP server of your provider. You can find this information either in your normal email client settings or via your provider.
- The standard SMTP port is 25 for plain SMTP and 465 for SSL.
- The From Address specifies the email send by DomotiGa will be coming from.
- The To Address specifies the address DomotiGa will send email to.
- Enable SSL for additional security, but see Debug first try to get things working without
- Auth Username and Password give the user name and password used to log on to the SMTP server.
- Leave empty if there is no authentication
- Also this this information you can find either in your normal email client settings or via your provider.
If you add something like "<tag ... </tag" to your email the MIME type will be set to text/html so that the email will be send out as email.
If your provider supports plain SMTP operation (no SSL) first try to get that working before trying SSL.
Enable Debug and try sending email using the Send Test Mail button.
You should see in the debug log something like:
2014/07/27 14:32:16 [Mail] From address: email@example.com 2014/07/27 14:32:16 [Mail] SMTP server: smtp.yourprovider.nl 2014/07/27 14:32:16 [Mail] SMTP Port: 25 2014/07/27 14:32:16 [Mail] To Address: firstname.lastname@example.org 2014/07/27 14:32:16 [Mail] Subject: DomotiGa: Test e-mail 2014/07/27 14:32:16 [Mail] Body: If you read this, e-mail support is working!
Now check also the Main log, there should be something like:
2014/07/27 14:32:17 [JSONClient] Successfully sent e-mail to 'email@example.com'.
Next check your email account that you specified in the To Address.
In case of error you will likely see something like in the Main log:
2014/07/26 22:51:04 [Mail] Error 'Authorization failed while sending authorization (SMTP error code #535)' occured when sending e-mail with subject 'DomotiGa: Test e-mail' to 'firstname.lastname@example.org'. 2014/09/07 17:07:39 [Mail] Error 'Unable to send mail: Unable to connect to the SMTP server: Cannot connect, timeout' occured when sending e-mail with subject 'DomotiGa: Test e-mail' to recipient 'email@example.com'.
If so, double check your settings.
If things still do not work you can try to log the traffic between you and the server for the case where you press the Send Test Mail button and for the case where you send an email through your normal email program. Study the differences and when getting an authorization failure, pay special attention to the base64 text following "plain auth".
You can "decode" the base64 using:
$ perl -MMIME::Base64 -MURI::Escape -e 'print uri_escape(decode_base64("dGVzdAB0ZXN0ADEyMzQ=")), "\n"' test%00test%001234