Parent

Class Index [+]

Quicksearch

Mail::TestMailer

The TestMailer is a bare bones mailer that does nothing. It is useful when you are testing.

It also provides a template of the minimum methods you require to implement if you want to make a custom mailer for Mail

Attributes

settings[RW]

Public Class Methods

deliveries() click to toggle source

Provides a store of all the emails sent with the TestMailer so you can check them.

    # File lib/mail/network/delivery_methods/test_mailer.rb, line 10
10:     def TestMailer.deliveries
11:       @@deliveries ||= []
12:     end
deliveries=(val) click to toggle source

Allows you to over write the default deliveries store from an array to some other object. If you just want to clear the store, call TestMailer.deliveries.clear.

If you place another object here, please make sure it responds to:

  • << (message)

  • clear

  • length

  • size

  • and other common Array methods

    # File lib/mail/network/delivery_methods/test_mailer.rb, line 25
25:     def TestMailer.deliveries=(val)
26:       @@deliveries = val
27:     end
new(values) click to toggle source
    # File lib/mail/network/delivery_methods/test_mailer.rb, line 29
29:     def initialize(values)
30:       @settings = {}
31:     end

Public Instance Methods

deliver!(mail) click to toggle source
    # File lib/mail/network/delivery_methods/test_mailer.rb, line 35
35:     def deliver!(mail)
36:       Mail::TestMailer.deliveries << mail
37:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.