anchor.diff: -As the name implies, the https://github.com/killbill/killbill-email-notifications-plugin[email notification plugin] is a plugin that sends out emails when certain events occur. This document covers how to install, test and use this plugin.
  +As the name implies, the https://github.com/killbill/killbill-email-notifications-plugin[email notification plugin] is a plugin that sends out emails when certain events occur. This document covers how to install, test, and use this plugin.
   
   == Prerequisites
   
  -Ensure that you have Kill Bill, Kaui and the database set up as explained in the https://docs.killbill.io/latest/getting_started.html[Getting Started Guide]
  +Ensure that you have Kill Bill, Kaui, and the database set up as explained in the https://docs.killbill.io/latest/getting_started.html[Getting Started Guide].
   
   == Overview
   
  
positive.code: org.killbill.billing.plugin.email-notifications.smtp.defaultSender=xxx@yyy.com' \
  http://127.0.0.1:8080/1.0/kb/tenants/uploadPluginConfig/killbill-email-notifications
       
  . If you are on Windows, we recommend that you use https://git-scm.com/download/win[Git Bash] to run the above command. Since the above is a multiline cURL command, it may not run run properly in the standard windows command prompt. Alternatively, you may also use Postman to execute the tenant configuration endpoint as explained https://docs.killbill.io/latest/postman.html[here].
  
  . *Configure the account* using the following cURL command (Replace `{accountId}` with the id of the account for which emails need to be sent and `<events>` with a comma separated list of the events for which the emails need to be sent. For example, to configure the account to send emails for *INVOICE_CREATION* and *INVOICE_PAYMENT_SUCCESS*, specify `"INVOICE_CREATION","INVOICE_PAYMENT_SUCCESS"`):
  [source,bash]
  curl -v \
       -X POST \
  
negative.code: 
  [options="header",cols="1,1"]
  |===
  |Event Type   |Email Description
  //-------------
  |INVOICE_CREATION   |The customer will receive an email informing them that a new invoice is available.   
  |INVOICE_NOTIFICATION   |The customer will receive an email about upcoming invoices (the time at which to send the email is configured through the Kill Bill system property `org.killbill.invoice.dryRunNotificationSchedule`).   
  |INVOICE_PAYMENT_SUCCESS   |The customer will receive an email after each successful payment or refund.
  |INVOICE_PAYMENT_FAILED   |The customer will receive an email after each failed payment.  
  |SUBSCRIPTION_CANCEL   | The customer will receive an email at the time a subscription was requested to be canceled and/or at the effective date of the subscription cancellation.  
  |===
  
  To send an email the following is required:
  
  * The tenant or account must be configured to permit such event(s). This is explained in the <<Plugin Configuration>> section below.
  
  * The account for which the emails need to be sent must have certain fields set. This is explained in the <<Account Configuration>> section below.
  
  
  
  