I’m running Odoo 17 Enterprise and want to switch to an external SMTP provider. Our current setup has decent delivery rates but some customers can’t receive emails due to geo-blocking.
I’ve looked into services like Mailgun and Postmark. They seem great for analytics but I’m unsure how to handle bounced emails. These providers typically use their own return-path which means Odoo won’t get the bounce notifications.
Does anyone know a way to make this work without custom code? We don’t do mass mailing, just regular business emails like invoices and quotes.
I’m worried about keeping our contact list clean without those bounce notifications. Any tips or experiences with this would be super helpful!
def send_email(recipient, subject, body):
# Imaginary function to send email via external SMTP
external_smtp.send(
to=recipient,
subject=subject,
body=body,
from_address='[email protected]'
)
# How to handle bounces here?
Thanks in advance for any advice!
Having worked extensively with Odoo and external SMTP providers, I can attest that this is indeed a common challenge. One effective solution I’ve implemented is utilizing the ‘Inbound Mail Gateway’ feature in Odoo. This allows you to set up a dedicated email address (e.g., [email protected]) which can receive bounce notifications from your SMTP provider.
You’ll need to configure your external SMTP service to forward bounce messages to this address. Then, set up rules in Odoo to process these incoming messages and update contact statuses accordingly. While it requires some initial setup, it’s a robust solution that doesn’t necessitate custom code.
Additionally, consider implementing a gradual transition strategy. Start by moving a subset of your email traffic to the external SMTP and monitor the results. This approach allows for fine-tuning and helps mitigate potential issues before full implementation.
I’ve dealt with similar issues in my Odoo implementation. One approach that worked for us was using webhooks provided by services like Mailgun or Postmark. These can notify your Odoo instance about bounces, allowing you to update your contact list accordingly.
For implementation, you’d need to set up an endpoint in Odoo to receive these webhook notifications, then configure your SMTP provider to send bounce data to this endpoint. It’s not a native Odoo feature, but it’s fairly straightforward to implement without extensive custom code.
Another option we explored was using an email validation service before sending. This can reduce bounces by flagging potential issues in advance. While it’s not perfect, it significantly improved our delivery rates and list hygiene.
Overall, these solutions require some setup but tend to be more cost-effective and reliable than building a custom email management system.
hey, i’ve had good luck with sendgrid for this. they let u set custom return-paths, so odoo can still catch bounces. just gotta tweak ur dns settings a bit. it’s not perfect but works pretty well for us. might be worth checkin out if u haven’t already. good luck!