The issue where replies to emails sent through an AWS SES outgoing mail server are creating separate tickets instead of updating the existing Helpdesk ticket in Odoo is likely due to the email alias configuration or the way reply-to addresses are handled in Odoo. Here’s how to troubleshoot and resolve this:
Understanding the Issue
- Outgoing Email Address: Emails are sent via AWS SES with the company’s email domain.
- Reply-to Email Mismatch: When a customer replies, the reply email may not correctly associate with the existing ticket because:
- The "Reply-To" header is not set correctly.
- The alias for the ticketing system is misconfigured.
Solution Steps
1. Verify Email Alias Configuration
Odoo uses email aliases to route incoming emails to the correct records (e.g., Helpdesk tickets).
-
Navigate to Settings > Technical > Email > Aliases.
-
Check the alias used for Helpdesk tickets:
- Ensure the alias matches the one configured for incoming emails.
- For example, if the ticket system uses support@company.com, the alias should reflect this.
-
Make sure the alias is linked to the correct Helpdesk team:
- Go to Helpdesk > Configuration > Helpdesk Teams.
- Check the Alias Name field.
- Example: If your email is support@company.com, the alias should be support.
2. Configure "Reply-To" Header in Outgoing Emails
Ensure the "Reply-To" header is set to the email alias for Helpdesk replies.
- Go to Settings > Technical > Email > Outgoing Mail Servers.
- Open the AWS SES outgoing mail server configuration.
- Set the "Reply-To" header for Helpdesk notifications:
- Navigate to Helpdesk > Configuration > Helpdesk Teams.
- Ensure that the team's email alias (support@company.com) is used as the "Reply-To" header.
How to Configure Reply-To in Email Templates:
- Go to Settings > Technical > Email Templates.
- Search for the Helpdesk email notification template.
- Edit the template to include the alias in the "Reply-To" field:
${object.team_id.alias_name}@company.com
3. Check Incoming Email Server Configuration
Odoo uses the incoming mail server to process customer replies.
-
Go to Settings > Technical > Email > Incoming Mail Servers.
-
Verify the configuration for the email account (support@company.com):
- Server Type: Set to IMAP/POP with the correct server details.
- Action to Perform: Ensure it is set to "Create a New Ticket or Update an Existing One."
-
Test the connection to ensure Odoo is correctly fetching emails.
4. Debug and Test
-
Test Outgoing Emails:
- Send a test email from the Helpdesk system.
- Check the email headers (specifically "Reply-To") to confirm the alias is correctly included.
-
Test Incoming Emails:
-
Debug Aliases:
- Use the developer mode to inspect alias-related configurations:
- Verify the alias points to the correct model (helpdesk.ticket) and object.
5. Consider Customization or Apps
If the default Odoo behavior does not meet your requirements, you can:
-
Customize the Email Routing Logic:
Modify the email processing logic to improve how Odoo identifies tickets based on reply emails. This can be done by overriding the mail.thread methods.
-
Third-Party Apps:
Look for third-party apps in the Odoo App Store that enhance email handling for Helpdesk:
- Example: "Helpdesk Email Enhancer."
Conclusion
The issue is likely caused by a misconfigured "Reply-To" header or an incorrect alias setup. Following these steps should ensure that replies to Helpdesk notification emails are correctly associated with existing tickets. If the problem persists, further customization may be required. Let me know if you need assistance with custom development!