actionmailer

Sendgrid/can't get emails

流过昼夜 提交于 2019-12-11 19:43:52
问题 Now I am trying to set up a contact form and removed all the errors.But I can't get email.Could you give me some advice? ☆heroku logs 2013-12-18T06:20:34.807594+00:00 app[web.1]: Started POST "/contacts" for 118.237.94.47 at 2013-12-18 06:20:34 +0000 2013-12-18T06:20:34.813037+00:00 app[web.1]: Processing by ContactsController#create as HTML 2013-12-18T06:20:34.813037+00:00 app[web.1]: Parameters: {"utf8"=>"✓", "authenticity_token"=>"2e9zz3cX0tZwYTZhaPbRRYQufff31fZk4OjjF7sdeo=", "contact"=>{

Rails Mailer is not actually sending emails

雨燕双飞 提交于 2019-12-11 19:32:15
问题 I have just started learning ruby on rails and this was one of the tutorials i followed: http://railscasts.com/episodes/206-action-mailer-in-rails-3 I followed it to a T and I have yet to receive anything in my gmail account. Is it fair to assume some updates to ruby have changed how you do things? My best guess from reading everything over the net, the tutorial is missing actually setting the mailer to use smtp setting. Here are my smtp settings: ActionMailer::Base.smtp_settings = { :address

wrong number of arg for devise emails

你离开我真会死。 提交于 2019-12-11 12:09:28
问题 I havent experienced this before, but since moving my rails site to Heroku I have getting the following message whenever trying to trigger Devise to send an email Started POST "/members/forgot-password" for 127.0.0.1 at 2013-02-24 00:02:27 +1100 Processing by Devise::PasswordsController#create as HTML Parameters: {"utf8"=>"✓", "authenticity_token"=>"9G1P34ddbq2TN7SkmFuCet5d7fPMvWdSSpIaGqSZW9g=", "user"=>{"email"=>"paul.mcguane@*****"}, "commit"=>"Recover password"} User Load (3.1ms) SELECT

Why is the email failing to send?

泄露秘密 提交于 2019-12-11 11:38:57
问题 I'm trying to allow a user to send an email to someone outside the app from their profile page once logged in to my web app. I am getting the notice 'email failed' when I press 'send email' from the modal. any ideas why it's failing? I've been trying to solve this for a week now so really appreciate some help! Thanks! Routes: devise_for :users resources :profiles do put :email_profile end Profile Controller: def email_profile @profile = Profile.find(params[:profile_id]) destination = params[

Cannot add inline attachment with actionmailer in rails 3

坚强是说给别人听的谎言 提交于 2019-12-11 11:13:52
问题 After a bundle install I am no longer able to add inline images to attachments. This is the error I get: NoMethodError (undefined method `type_for' for MIME::Types:Class): app/mailers/welcome_mailer.rb:14:in `add_inline_attachment!' So clearly the type_for method is being called on a class instead of an object. Here is how I add the inline attachment, it follows the guidelines from ActionMailer: attachments.inline['photo.png'] = File.read('path/to/photo.png') I have tested that the file

Actionmailer instance variable problem Ruby on Rails

只谈情不闲聊 提交于 2019-12-11 09:23:52
问题 I have an email scheduler setup to send a daily e-mail with updates about the site to all users, However, when I try and send the e-mail, all variables come back as nil, i'm assuming because nothing is explicitly defined. i.e. No one is submitting a form with their email, clicking submit and triggering an e-mail, it's just a daily email to all users, that for simplicities sake, we'll say should contain the receiving user's email address. <%= @user.email %> Thanks in advance for the help! def

How does Actionmailer work?

社会主义新天地 提交于 2019-12-11 07:44:30
问题 If I need send some letter to 2 people, how can I do this? I found docs in web, but I don't understand them, can you show me and explain me using simple language? 回答1: def send_mail_persons(user) @user = user mail :to => @user.email, :subject => "Amusement.", :from => MAIL_ADDRESS end Here i have called the method send_mail_persons and passed the recipients info as a parameter.Also there is a simple way.. def send_mail_persons mail :to => MAILING_ADDRESS, :subject => "Amusement.", :from =>

Helper methods available in mailer views depend on environment?

[亡魂溺海] 提交于 2019-12-11 07:37:12
问题 Related to my previous question I still have one thing that I would like to understand - why this: = link_to(root_path) = link_to(@some_path_set_in_mailer) works in development mode (config.action_mailer.perform_deliveries was set to true and emails were actually sent) and in production or staging has to be changed to: = link_to(@some_path_set_in_mailer, @some_path_set_in_mailer) to avoid "No route matches {}" error? I had this problem in rails 3.2. 回答1: I'm not entirely sure why there is a

Response from SMTP server with Rails

喜你入骨 提交于 2019-12-11 05:27:50
问题 How could I get the response from an SMTP server in Ruby on Rails using ActionMailer, when I send an email with the Mailer.deliver method? I found the Actionmailer SMTP Server Response answer but it doesn't work... Any idea? I need it because AWS SES return a message ID through, and it's the only way to get the message linked to a bounce or spam report they provide after. 回答1: if you get the smtp in way like this response = Mail.your_mail().deliver and it isn't getting the response that you

serious problems sending mails via actionmailer in production ROR

江枫思渺然 提交于 2019-12-11 04:46:26
问题 I really need help with this, have been trying to work this out for 3 days :( My app is supposed to send emails to customer when order is either received or shipped but it constantly breaks with this error. I, [2017-05-23T11:01:44.741054 #1060] INFO -- : Completed 500 Internal Server Error in 66ms (ActiveRecord: 4.2ms) F, [2017-05-23T11:01:44.743481 #1060] FATAL -- : SocketError (getaddrinfo: Name or service not known): app/admin/order.rb:6:in `block (2 levels) in <top (required)>' My