Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

action_mailer_test_via_smtp

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

action_mailer_test_via_smtp

  • 0.2.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

= action_mailer_test_via_smtp

If you want to test your e-mails not just in your log, this library is for you. It allows you to configure a test-recipient which gets all mails send via SMTP. Best for testing or staging evironments.

At the moment, this library is only tested with Rails 2.3.8

== Usage

Load the gem

config.gem "action_mailer_test_via_smtp"

and in you staging.rb (environment file) you can configure this mode

require "action_mailer_test_via_smtp" config.action_mailer.delivery_method = :test_via_smtp config.action_mailer.test_recipient = "andi@galaxycats.com"

now every single mail will be sent to the test_recipient, prefixed with the original recipient.

Since 0.2.0 you can also test 'sendmail' and even 'test':

config.action_mailer.delivery_method = :test_via_sendmail

or

config.action_mailer.delivery_method = :test_via_test

I know, the gem name is not valid anymore.

== Custom Mail-Header

You can change the standard test mail header by writing your own renderer. Just set

config.test_mail_header_renderer = CustomMailHeaderRenderer

Your class should look something like this

class CustomMailHeaderRenderer < ActionMailerTestViaSmtp::HeaderRenderer::Base def test_mail_header # you can access 'mail' which is a TMail::Mail "return a prepared string" end

def test_mail_header_html
  # you can access 'mail' which is a TMail::Mail
  "return a prepared string"
end

end

== Note on Patches/Pull Requests

  • Fork the project.
  • Make your feature addition or bug fix.
  • Add tests for it. This is important so I don't break it in a future version unintentionally.
  • Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
  • Send me a pull request. Bonus points for topic branches.

== Copyright

Copyright (c) 2010 Galaxy Cats IT Consulting GmbH. See LICENSE for details.

FAQs

Package last updated on 12 Aug 2010

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc