A developer shares their journey in optimizing an email sending system for a client, achieving impressive results. Initially, they used Rails' `deliver_now` method, but it was slow and not suitable for high-volume emailing. They then implemented `deliver_later`, which improved performance but still had limitations. The solution was to use `perform_all_later`, enabling bulk job enqueuing and sending 500,000 emails in approximately 15 seconds.
The developer also explored alternative solutions, including monkey-patching ApplicationMailer, using a mail provider's native bulk send feature, and employing BCC. However, these approaches had limitations or were not suitable for the specific use case. The post concludes with the importance of continuous optimization and invites readers to share their own experiences in improving email sending systems.
Source: https://dev.to/pimp_my_ruby/my-journey-to-send-100-mails-to-500k-effortlessly-1ne7