Ok so I kind of got something working but I can’t figure out what is incorrect here, I’d appreciate any input.
If I do this:
def self.send_user_email(address)
message = Mail::Message.new(from: "from@fromEmail.com", to: address, body: "body would go here controlled by var")
Email::Sender.new(message, :admin_login).send //I used admin_login as according to the spec it should send even if email is disabled.
end
When I do this however I am getting an error.
If I run the code above natively I see:
NoMethodError - undefined method deliver_now' for #<Mail::Message:0x007fa1bf157300> Did you mean? deliver: mail (2.6.6) lib/mail/message.rb:1379:in method_missing’
So if I go and update line 184 of the sender.rb file to be: @message.deliver instead of deliver_now I am able to get it to kinda try to send an email on my development environment.