The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Action Mailer tips

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Tobias Luetke

Posts: 150
Nickname: xal
Registered: Jan, 2005

Tobias Luetke is a contributor to the ruby on rails project
Action Mailer tips Posted: Mar 16, 2005 2:28 PM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Tobias Luetke.
Original Post: Action Mailer tips
Feed Title: too-biased
Feed URL: http://blog.leetsoft.com/xml/rss/
Feed Description: Read the announcement: CD Baby rewrite in Postgres and Ruby, Baby!CD Baby is going rails. This is huge! If you don’t know CD Baby, its a distribution site with over 80.000 musicians under contract and its one of the biggest digital distributors of audio to Apple iTunes, Napster, Rhapsody, etc.  Read all about it here. What is even more exciting about it is that I’m on board for the rewrite and I had chance to talk to Derek on the phone directly for a consulting session which might have played its little part in the decision to go with rails. Come monday I’ll work together with him and other rails contributor Jeremy Kemper to help crunch those 90k lines of PHP in beautifully compact code for which Rails and Ruby are known. Here is a quote from Derek’s announcement on his weblog: Like a lost soul walkin’ the earth, lookin’ for spirituality, that stumbles upon the right church with the right people at the right time, I’ve found my niche with Ruby. Its little itty-bitty community attracts some brilliant “think different” types with a love for beautiful code that do this for love, not money.
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Tobias Luetke
Latest Posts From too-biased

Advertisement

OK so today I confused the hell out of my partner who does all the shipping for snowdevil.

After testing a new revision of the software I he called me and asked “Hey did you really just order 3 snowboards??!”. My local test have been dispatching emails looking just like the real thing.

Here is a simple which keeps emails going but doesn’t confuse the hell out of other people (added to your development.rb) :


ActionMailer::Base.perform_deliveries              = true
ActionMailer::Base.delivery_method                 = :fixed_email

class ActionMailer::Base

  def self.perform_delivery_fixed_email(mail)
    mail.to = 'your.own@email-address.com'
    mail.subject = '[DEV] ' + mail.subject
    Net::SMTP.start(
           server_settings[:address], 
           server_settings[:port], 
           server_settings[:domain], 
           server_settings[:user_name], 
           server_settings[:password], 
           server_settings[:authentication]) do |smtp|
                 smtp.sendmail(mail.encoded, mail.from, mail.destinations)
           end
  end

end

Now i get all the emails the system sends myself. Thats much better…

Read: Action Mailer tips

Topic: I'm driving Ruby on Rails to OSCON Previous Topic   Next Topic Topic: Do you have a passion for testing?

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use