Git Product home page Git Product logo

Comments (5)

myronmarston avatar myronmarston commented on August 28, 2024

It should work fine from the rails console. Mail safe itself doesn't know anything about the rails console; it simply does its job if it has been required, and has no effect if it has not been required.

Can you verify that mail safe has been required when you log into your rails console? Here's what I see in my rails console:

 > $".select { |f| f =~ /mail_safe/ }
 => ["mail_safe/config.rb", "mail_safe/address_replacer.rb", "mail_safe/rails3_hook.rb", "mail_safe.rb"]

($" is an array containing all files that have been required).

from mail_safe.

magpieuk avatar magpieuk commented on August 28, 2024

HI Myron

Yes I can confirm that it returns

["/home/irvingld/.rvm/gems/ruby-1.9.2-p180@global/gems/mail_safe-0.3.1/lib/mail_safe/config.rb",
"/home/irvingld/.rvm/gems/ruby-1.9.2-p180@global/gems/mail_safe-0.3.1/lib/mail_safe/address_replacer.rb",
"/home/irvingld/.rvm/gems/ruby-1.9.2-p180@global/gems/mail_safe-0.3.1/lib/mail_safe/rails3_hook.rb",
"/home/irvingld/.rvm/gems/ruby-1.9.2-p180@global/gems/mail_safe-0.3.1/lib/mail_safe.rb"]

But If call call Action Mailer from the console it sends out. I
thought it might be just me but wanted someone else to check.

On Fri, Oct 28, 2011 at 7:40 PM, Myron Marston
[email protected]
wrote:

It should work fine from the rails console.  Mail safe itself doesn't know anything about the rails console; it simply does its job if it has been required, and has no effect if it has not been required.

Can you verify that mail safe has been required when you log into your rails console?  Here's what I see in my rails console:

 > $".select { |f| f =~ /mail_safe/ }
 => ["mail_safe/config.rb", "mail_safe/address_replacer.rb", "mail_safe/rails3_hook.rb", "mail_safe.rb"]

($" is an array containing all files that have been required).

Reply to this email directly or view it on GitHub:
#6 (comment)

from mail_safe.

myronmarston avatar myronmarston commented on August 28, 2024

What does this show in your console?

> Mail.send(:class_variable_get, '@@delivery_interceptors')
 => [MailSafe::MailInterceptor]

I'm thinking that maybe something is clearing the interceptors registered with Mail, including mail_safe. that would explain it not working.

from mail_safe.

magpieuk avatar magpieuk commented on August 28, 2024

Thanks for taking the time with this myron.

Looks the same to me

Mail.send(:class_variable_get, '@@delivery_interceptors')
[MailSafe::MailInterceptor]

If you can do a simple test from a clean app and the problem is not there then it must be an issue with my config. I wasnt saying it was a problem, just I needed a second pair of eyes.

from mail_safe.

jjconti avatar jjconti commented on August 28, 2024

I tested it form rails console and works as expected.

from mail_safe.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.