Skip to content

Instantly share code, notes, and snippets.

@modsaid
Created October 4, 2012 11:45
Show Gist options
  • Save modsaid/3833121 to your computer and use it in GitHub Desktop.
Save modsaid/3833121 to your computer and use it in GitHub Desktop.

Revisions

  1. modsaid created this gist Oct 4, 2012.
    13 changes: 13 additions & 0 deletions gistfile1.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    #place this directly in the rails console of ur rails application
    class UserMailer < ActionMailer::Base
    default from: '[email protected]'

    def test_email
    @receiver_email = '[email protected]'
    mail(to: @receiver_email, subject: 'testing email from console')
    end
    end

    UserMailer.test_email.deliver!

    # If the configuration is correct and everything is fine, the receiver should receive the test email instantly