I am building a tool for users to send invites for a site. Is ActionMailer the best way to send the mail? It seems to be very very slow.
Anyone have other recommendations?
(Ubuntu Intrepid Server)
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Action mailer is slow for you because it is sending synchronously, waiting for google to go through the whole mail sending protocol. You can see this in detail in your log. The request doesn’t finish until the mail sending does.
You have a couple options to speed this up:
use asynchronous sending. This can be from a tool like background job/delayed job, and I’d recommend that to start. There may even be a lighter weight solution. If that doesn’t hack it, starling and workling provide more robust queues for this.
attach to a local mail sender. You can set up a local smtp server, or use the send_mail configuration option.