Test driving Mailgun - Running the Mailgun.rb Demo
If you want your Rails application to send email, you should look into Mailgun. Another alternative would be to use Gmail with stmp set up, but using Gmail comes with some restrictions that Mailgun doesn't have. For example, in Gmail, the email sender would be displayed as the address of Gmail account. In Mailgan you can configure it to be different sender.
I was trying out this git package provided by Mailgun to try out. In this demo, I am merely trying to send email
1. I cloned the git package.
> git clone https://github.com/mailgun/mailgun.rb
2. Modify the MailgunMessage::send_text in sending-message.rb to suit your purpose.
MailgunMessage::send_text("xxx@xxx.com",
"yyy@yyy.com, 'yyy' <yyy@yyy.com>",
"Hello text Ruby API",
"Hi!\nI am sending the message using Mailgun Ruby API")
- rails version 3.0.10
- ruby 1.9.2p290 (2011-07-09 revision 32553) [i686-linux]