Browse Source

update gmil checker doc

nico 8 years ago
parent
commit
af14ca4ad0
1 changed files with 29 additions and 0 deletions
  1. 29 0
      neurons/gmail_checker/README.md

+ 29 - 0
neurons/gmail_checker/README.md

@@ -34,6 +34,35 @@ Simple example :
       - order: "Do I have emails"
 ```
 
+A complex example that read subject emails. This is based on a file_template
+```
+  - name: "check-email"
+    neurons:
+      - gmail_checker:
+          username: "me@gmail.com"
+          password: "my_password"
+          file_template: /templates/my_email_template.j2            
+    signals:
+      - order: "Do I have emails"
+```
+
+Here the content of the `my_email_template.j2`
+```
+You have {{ unread }} email
 
+{% set count = 1 %}
+{% if unread > 0 %}
+    {% for subject in subjects %}
+     email number {{ count }}. {{ subject }}
+     {% set count = count + 1 %}
+    {% endfor %}
+{% endif %}
+```
 ## Notes
 
+Gmail now prevent some mailbox to be accessed from tier application. If you receive a mail like the following:
+```
+Sign-in attempt prevented ... Someone just tried to sign in to your Google Account mail@gmail.com from an app that doesn't meet modern security standards.
+```
+
+You can allow this neuron to get un access to your email in your [Gmail account settings](https://www.google.com/settings/security/lesssecureapps).