SyntaxHighlighter

Tuesday, September 25, 2007

Feature complete

The last two features - Ratings and Email went in quickly, but email required some tricks that I'll outline below. I was trying to hook up with my Google Apps account, and this required some extra configuration as Google requires SMTP+SSL or TLS.

Here's what I did to get my Ruby on Rails app to send email through ActionMailer using Google Apps.

First - you need to add a plugin. Follow the instructions on this blog post by Stephen Chu How to use Gmail SMTP server to send email in Rails ActionMailer. The plugin is necessarly to allow ActionMailer to use TLS.

Lastly, I was getting errors in production. No template found...

The answer to this problem was on a blog post by Miroslav Škultéty: No rhtml, rxml, rjs or delegate template found.

It is still slow, the server logs in to send the email while the browser waits for a response. I'll fix this later and figure out how to move it to a separate thread.

No comments:

Post a Comment