Merge pull request #5299 from vjFaLk/alert-docs

Updated Email Alert docs
diff --git a/erpnext/docs/assets/img/setup/email/email-alert-condition.png b/erpnext/docs/assets/img/setup/email/email-alert-condition.png
new file mode 100644
index 0000000..8ede011
--- /dev/null
+++ b/erpnext/docs/assets/img/setup/email/email-alert-condition.png
Binary files differ
diff --git a/erpnext/docs/assets/img/setup/email/email-alert-subject.png b/erpnext/docs/assets/img/setup/email/email-alert-subject.png
new file mode 100644
index 0000000..671de9b
--- /dev/null
+++ b/erpnext/docs/assets/img/setup/email/email-alert-subject.png
Binary files differ
diff --git a/erpnext/docs/user/manual/en/setting-up/email/email-alerts.md b/erpnext/docs/user/manual/en/setting-up/email/email-alerts.md
index f4cccd3..1a5d13a 100644
--- a/erpnext/docs/user/manual/en/setting-up/email/email-alerts.md
+++ b/erpnext/docs/user/manual/en/setting-up/email/email-alerts.md
@@ -28,6 +28,41 @@
 1. Set the recipients of this alert. The recipient could either be a field of the document or a list of fixed email ids.
 1. Compose the message
 
+
+### Setting a Subject
+You can retrieve the data for a particular field by using `doc.[field_name]`. To use it in your subject / message, you have to surround it with `{{ }}`. These are called [Jinja](http://jinja.pocoo.org/) tags. So, for example to get the name of a document, you use `{{ doc.name }}`. The below example sends an email on saving a Task with the Subject, "TASK##### has been created"
+
+<img class="screenshot" alt="Setting Subject" src="{{docs_base_url}}/assets/img/setup/email/email-alert-subject.png">
+
+### Setting Conditions
+
+Email alerts allow you to set conditions according to the field data in your documents. For example, if you want to recieve an Email if a Lead has been saved as "Interested" as it's status, you put `doc.status == "Interested"` in the conditions textbox. You can also set more complex conditions by combining them.
+
+<img class="screenshot" alt="Setting Condition" src="{{docs_base_url}}/assets/img/setup/email/email-alert-condition.png">
+
+The above example will send an Email Alert when a Task is saved with the status "Open" and the Expected End Date for the Task is the date on or before the date on which it was saved on. 
+
+### Setting a Message
+
+You can use both Jinja Tags (`{{ doc.[field_name] }}`) and HTML tags in the message textbox. 
+
+	<h3>Order Overdue</h3>
+
+	<p>Transaction {{ doc.name }} has exceeded Due Date. Please take necessary action.</p>
+
+	<!-- show last comment -->
+	{% if comments %}
+	Last comment: {{ comments[-1].comment }} by {{ comments[-1].by }}
+	{% endif %}
+
+	<h4>Details</h4>
+
+	<ul>
+	<li>Customer: {{ doc.customer }}
+	<li>Amount: {{ doc.total_amount }}
+	</ul>
+
+
 ---
 
 ### Example