Created
March 5, 2010 02:07
-
-
Save phillipkoebbe/322378 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# config/environments/development.rb | |
# add this line | |
config.action_mailer.delivery_method = :test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# app/models/my_mailer.rb | |
class MyMailer < ActionMailer::Base | |
def test_message(content) | |
recipients '[email protected]' | |
from '[email protected]' | |
subject 'Test Message' | |
body content | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# app/controllers/test_controller.rb | |
class TestController < ApplicationController | |
def send_mail | |
MyMailer.deliver_test_message('Hi There.') | |
render :nothing => true | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment