Managing the email alias
Email aliasing is a feature in Odoo that is used to create a record through incoming emails. The simplest example of an email alias is sales teams. You just need to send an email to sale@yourdomain.com
, and Odoo will create a new record for crm.lead
in the sales team. In this recipe, we will create one email alias to create a hostel student record.
Getting ready
For this recipe, we will be using the my_hostel
module from the previous recipe, Sending emails using the QWeb template. We will create our email alias with the hostelstudent@yourdomain.com
email address. If you send an email to this email address with the book’s name in the subject, a record is created in the hostel.student
model.
How to do it...
Follow these steps to add an email alias for the hostel.student
model:
- Add the email alias data in the
my_hostel/data/mail_template.xml
file:<record id="mail_alias_room_assign" model="mail.alias"> ...