Poweremail Tutorial
What is Power Email?
Power Email is a 'Power'full email system integrated into Open ERP and works like any other module for Open ERP. The beauty of power email is the fact that it has a generic architecture, means its compatible with all existing modules of Open ERP and all future modules as well.
What is the difference with SMTP Client?
No doubt, SMTP client is a powerful feature of Open ERP, but as its tagline goes it is 'A great feature for Tiny Developers'. When you require coding to integrate emails using the SMTP client, poweremail can be used without a single line of code. Design your templates from the frontend and simply start mailing.
Can I do mass mailing?
Yes, you can select multiple records and click on the action for sending your email and all your mails are generated and sent to the outbox. You can thus select your partners and send them personalised mass mails or even send all your invoices in a single click.
How do I install poweremail?
Just download the latest version of module from https://launchpad.net/poweremail/+download to your addons location. Update your modules list and simply install the module.
For the developer: The project is completely managed at launchpad. I recommend you to have the latest tip always. Branch:lp:poweremail/poweremailtrunk
Ok, how do i configure Power Email to send & receive mail
Poweremail can be used in three simple steps:
- 1.Defining your email accounts.
- 2.Defining templates
- 3.Send mails!!
- 4.Receive mails
Step 1: Defining your email accounts.
- After installing the module open the menu option (Power Email > Configuration > All account).
- Create a new record and give a name for your account.
- The account configuration is to be done for incoming & outgoing respectively.Specify the settings in the first tab and click on 'Check Outgoing Connection' to verify the settings.
- If your settings are succesful Open ERP will give you the alert 'Test Connection was successful'.
- Select your mail format: You can choose to send mails in Plain Text (for mobile mail readers & older clients), HTML (Accepted by all new mail readers & browsers), Or, Both (More combatibility).
- After all the settings have been made your screen will look like:
- A note about 'Company Mail A/c': Company mail accounts are of type 'sales@yourdomain.com' etc which you use for commercial purposes. Only such accounts can be used for the automatic emails etc. However power email also provides a provision for your employees to use their personal mails in the ERP system itself.
- The settings for mail sending are now complete. Lets now configure incoming mail.
- The incoming mail accounts may be of type POP3 or IMAP. After the settings have been configured you can test your settings just as with the outgoing mail server.
- A note about IMAP: When IMAP accounts are used, it is mandatory to select a 'Folder' or 'Label' in gmail terms.
- Below screen shot gives the example of how i configured my account using IMAP:
- Approval of Accounts:
- Any user of the system can create email accounts but before they can start using their accounts it needs to be approved. Approval is done by admins who have the role of 'Power Email Administrator'.
- If there are no approved accounts in the system the send mail feature will either fail to load or return an error asking you to choose accounts.
Step 2: Defining templates
The process of defining templates is used to configure email for a specific model. The process is generic for all modules and the example shown is for a simple quotation mail system (Email a quotation when its confirmed).
- 1.Name of Template : Enter a name eg.Quotation (The wizard button will be automatically called Quotation Mail Form)
- 2.Model : The object for which you are defining the template (Eg Sale Order [sale.order])
- 3.To/CC/BCC: These fields are self explanatory and are again computed fields, meaning you can have an expression and the expression would be evaluated. For example, you want your quotation to be sent to the customers email. For that we use the expression builder (Refer to next section for usage of expression builder) and chose 'Shipping Address' as our Field, Then 'E-Mail' as our sub field and 'No Email' as Null Value. The expression will be computed as '${object.partner_shipping_id.email or 'No Email'}'.
- 4.Subject : Subject of your email eg: 'Quotation: ${object.name or 'Ord No'} dated: ${object.date_order}'
- 5.File Name pattern: This pattern can also be computed using expressions and your attached report filename(If any) will be using the pattern you specify.
- 6.Report to send : You can also choose one report from the reports of the model, which will be generated along with your mail. (Future versions will support multiple attachments).
- 7.Standard Body : Your emails are sent as Mime multipart alternative, meaning a text & html version are sent simultaneously (For increased combatibility). You are hence allowed to have a text body and a html body. However the HTML body can be edited only using the Web Client as the GTK-Client currently does not have a HTML widget.
- Using Expression builder:
- The expression builder is used to generate placeholders for creating templates. Inserting Simple Fields:
- Select a field in the model you have selected
- Sub field option will be open if the selected field is relational
- Null Value is the value if the selected field is empty
- The expression thus generated can be dragged and dropped (in Linux) or copied and pasted into your computed fields.
- Inserting Tables:
- Select the Table field for which you want to display table. (Only applicable for one2many and many2many fields)
- Add the fields you want to display and you will have automatically generated HTML Mako code which you can use in your HTML body
- Preview Feature:
- You can preview all mails in the template designer itself by clicking the 'Preview Template' button. The wizard will suggest the possible existing records you can preview.
- Some sample template:
- For text body (Sale Order):
- Dear ${object.partner_order_id.title or ' '} ${object.partner_order_id.name or 'Customer'},
- We thank you for your enquiry. Please find attached herewith a document in PDF format, which contains your detailed quotation. The product(s) you had enquired were:
- % for o in object.order_line:
- ${o.name}t
- %endfor
- Thanks & Regards,
- ${object.user_id.name or 'Sales Team'}
- For HTML body (Sale Order):
- Sending Mails:
- A new wizard button will now appear along with the templated model (Quotation Mail Form for Sale Order).
- An action is also available in the list view which can be used for mass mailing in case of multiple records or even individual mails.
- You can simply click the button and a new compose window will popup where you can see an already drafted mail.
- Click on 'Save to drafts' to save to the mailbox or 'Send Now'.
- The 'Send Now' button will save the mail to outbox which will be periodically cleared by the Power Email Scheduler.
- Auto Emails:
- Auto emails is made possible through the powerful Server Action feature of Open ERP. But, power email makes it easier for you by automatically managing the server action part for you.
- Enable Auto email check box and select the workflow, then the stage/activity during which the mail has to be sent. Power email will automatically create a server action for sending mail.
- A sample send mail preview from the Web Client:
Sending Mails :
All emails before sending are in Outbox and after sending in Sent Items. Open any item and click on send now to override the scheduler and send the mail immediately. All outbox messages are sent periodically by a scheduler.
Receiving Mails:
- Mails are periodically downloaded by a scheduler automatically. However if you would like to override and do a send receive manually, click on the send/receive button in the email account definition page.
- Sharoon Thomas, creator and main contributor of Power Email for Open ERP.
- Important links for collaborating in the project are here:
- Hosted location: http://launchpad.net/poweremail
- Downloads : http://launchpad.net/poweremail/+download
- Bug tracking & reporting: http://bugs.launchpad.net/poweremail/+bugs
- Questions: http://launchpad.net/poweremail/+addquestion
- Translations: https://translations.launchpad.net/poweremai

E-mail
(520) 477-1317





