...is like to have a cutter that doesn''t cut! :) Hello, I''m working on Action Mailer, with a simple email confirmation when a user signs up. So, basically when I try to register myself on my local server, the registration goes just fine, without errors nor failures, but I ultimately don''t receive any email from myself, even though the app is supposed and structured to do so. For instance , I have the Notifier model structured so : class Notifier < ActionMailer::Base default :from => "###MY EMAIL###" def welcome(user) @user = user mail (:to => user.email , :subject => "Signed up successfully") end end ...and my UserController : def create @user = User.new(params[:user]) respond_to do |format| if @user.save Notifier.welcome(@user).deliver format.html { redirect_to(@user, :notice => "User #{@user.name } was successfully created.") } format.xml { render :xml => @user, :status => :created, :location => @user } else format.html { render :action => "new" } format.xml { render :xml => @user.errors, :status => :unprocessable_entity } end end end I''ve got a Gmail account , and in my environments/development.rb I configured the gmail account in this way : config.action_mailer.smtp_settings = { :address => "smtp.gmail.com", :port => 587, :domain => "gmail.com", :authentication => "plain", :user_name => "MY EMAIL", :password => ''#MY PASSWORD'', :enable_starttls_auto => true } Any idea??? Thank you very much! Leo -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Are you running the server in development mode? Are you getting any errors in your log? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/BYnbYs9lmkIJ. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Nope, the log shows a -I guess- normal session : Sent mail to leo.mmcm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org (4245ms) Date: Mon, 29 Aug 2011 14:39:43 +0200 From: leo.mmcm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org To: leo.mmcm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Message-ID: <4e5b888f9c7e6_6a0482ece0c86423a-08GikMmVJ3hHCpo2ZYJt3Q@public.gmane.org> Subject: Iscrizione completa! Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Redirected to http://0.0.0.0:3000/users/46 Completed 302 Found in 4711ms The really weird thing is that I tried to send an email to a fake address, and then, in that case I receive an email from Email Delivery Subsystem, with the normal notice about an inexistent domain, so it means that ActionMailer actually works, but for some reason I''m not able to receive the email I send to myself. I can''t see any evident clue in here, let me know if you see one : Delivery to the following recipient failed permanently: sdpaoksdjf-pMcvpjwHbAQsA/PxXw9srA@public.gmane.org Technical details of permanent failure: DNS Error: Domain name not found ----- Original message ----- Received: by 10.227.38.22 with SMTP id z22mr2606056wbd.7.1314614527794; Mon, 29 Aug 2011 03:42:07 -0700 (PDT) Return-Path: <leo.mmcm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Received: from gmail.com (93-45-120-143.ip102.fastwebnet.it [93.45.120.143]) by mx.google.com with ESMTPS id fd4sm3622444wbb.30.2011.08.29.03.42.05 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 29 Aug 2011 03:42:06 -0700 (PDT) Date: Mon, 29 Aug 2011 12:45:06 +0200 From: leo.mmcm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org To: sdpaoksdjf-pMcvpjwHbAQsA/PxXw9srA@public.gmane.org Message-ID: <4e5b6db295886_6a0482f465146412f-08GikMmVJ3hHCpo2ZYJt3Q@public.gmane.org> Subject: Iscrizione completa! Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Right, this is weird. I didn''t change a single line and tried again to register with the usual email address and this time I received the message! Some conflict at ISP level maybe? Could be? Thank you guys, Leo -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Walter Lee Davis
2011-Aug-29 12:54 UTC
Re: Re: Having an Action Mailer that doesn''t mail.
On Aug 29, 2011, at 8:43 AM, Leo M. wrote:> Nope, the log shows a -I guess- normal session : > > Sent mail to leo.mmcm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org (4245ms) > Date: Mon, 29 Aug 2011 14:39:43 +0200 > From: leo.mmcm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > To: leo.mmcm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > Message-ID: <4e5b888f9c7e6_6a0482ece0c86423a-08GikMmVJ3hHCpo2ZYJt3Q@public.gmane.org> > Subject: Iscrizione completa! > Mime-Version: 1.0 > Content-Type: text/plain; > charset=UTF-8 > Content-Transfer-Encoding: 7bit > > Redirected to http://0.0.0.0:3000/users/46 > Completed 302 Found in 4711ms > > The really weird thing is that I tried to send an email to a fake > address, and then, in that case I receive an email from Email Delivery > Subsystem, with the normal notice about an inexistent domain, so it > means that ActionMailer actually works, but for some reason I''m not > able > to receive the email I send to myself. > I can''t see any evident clue in here, let me know if you see one : > > Delivery to the following recipient failed permanently: > > sdpaoksdjf-pMcvpjwHbAQsA/PxXw9srA@public.gmane.org > > Technical details of permanent failure: > DNS Error: Domain name not found > > ----- Original message ----- > > Received: by 10.227.38.22 with SMTP id z22mr2606056wbd. > 7.1314614527794; > Mon, 29 Aug 2011 03:42:07 -0700 (PDT) > Return-Path: <leo.mmcm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > Received: from gmail.com (93-45-120-143.ip102.fastwebnet.it > [93.45.120.143]) > by mx.google.com with ESMTPS id > fd4sm3622444wbb.30.2011.08.29.03.42.05 > (version=TLSv1/SSLv3 cipher=OTHER); > Mon, 29 Aug 2011 03:42:06 -0700 (PDT) > Date: Mon, 29 Aug 2011 12:45:06 +0200 > From: leo.mmcm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > To: sdpaoksdjf-pMcvpjwHbAQsA/PxXw9srA@public.gmane.org > Message-ID: <4e5b6db295886_6a0482f465146412f-08GikMmVJ3hHCpo2ZYJt3Q@public.gmane.org> > Subject: Iscrizione completa! > Mime-Version: 1.0 > Content-Type: text/plain; > charset=UTF-8 > Content-Transfer-Encoding: 7bit >Is this mail being sent/received on a DSL/Cable modem? Your ISP may be filtering mail sent directly by your computer as an anti-spam measure. Since you entered an intentionally garbled address as a testing measure, then your localhost might not have been able to forward it to the next hop, and the error message may have come from whatever you use for sendmail on your local computer. In the case of a well-formed message, your machine may have sent it on to the next mailserver in the chain, which would be your ISP, and they looked at it, decided you were not a real server, and dropped it on the floor without comment. Now if you''re sending from a real server with an MX record and everything, then I have no idea. Walter -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Walter Davis wrote in post #1019034:> On Aug 29, 2011, at 8:43 AM, Leo M. wrote: > >> charset=UTF-8 >> to receive the email I send to myself. >> >> Date: Mon, 29 Aug 2011 12:45:06 +0200 >> From: leo.mmcm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org >> To: sdpaoksdjf-pMcvpjwHbAQsA/PxXw9srA@public.gmane.org >> Message-ID: <4e5b6db295886_6a0482f465146412f-08GikMmVJ3hHCpo2ZYJt3Q@public.gmane.org> >> Subject: Iscrizione completa! >> Mime-Version: 1.0 >> Content-Type: text/plain; >> charset=UTF-8 >> Content-Transfer-Encoding: 7bit >> > > Is this mail being sent/received on a DSL/Cable modem? Your ISP may be > filtering mail sent directly by your computer as an anti-spam measure. > > Since you entered an intentionally garbled address as a testing > measure, then your localhost might not have been able to forward it to > the next hop, and the error message may have come from whatever you > use for sendmail on your local computer. > > In the case of a well-formed message, your machine may have sent it on > to the next mailserver in the chain, which would be your ISP, and they > looked at it, decided you were not a real server, and dropped it on > the floor without comment. > > Now if you''re sending from a real server with an MX record and > everything, then I have no idea. > > WalterThank you for your reply. IMO what you say is likely, but right now it''s somehow solved by itself :°) A pity though, I would have known where was the catch. Thanks Leo -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Walter Lee Davis
2011-Aug-29 13:43 UTC
Re: Re: Re: Having an Action Mailer that doesn''t mail.
On Aug 29, 2011, at 9:16 AM, Leo M. wrote:> Walter Davis wrote in post #1019034: >> On Aug 29, 2011, at 8:43 AM, Leo M. wrote: >> >>> charset=UTF-8 >>> to receive the email I send to myself. >>> >>> Date: Mon, 29 Aug 2011 12:45:06 +0200 >>> From: leo.mmcm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org >>> To: sdpaoksdjf-pMcvpjwHbAQsA/PxXw9srA@public.gmane.org >>> Message-ID: <4e5b6db295886_6a0482f465146412f-08GikMmVJ3hHCpo2ZYJt3Q@public.gmane.org> >>> Subject: Iscrizione completa! >>> Mime-Version: 1.0 >>> Content-Type: text/plain; >>> charset=UTF-8 >>> Content-Transfer-Encoding: 7bit >>> >> >> Is this mail being sent/received on a DSL/Cable modem? Your ISP may >> be >> filtering mail sent directly by your computer as an anti-spam >> measure. >> >> Since you entered an intentionally garbled address as a testing >> measure, then your localhost might not have been able to forward it >> to >> the next hop, and the error message may have come from whatever you >> use for sendmail on your local computer. >> >> In the case of a well-formed message, your machine may have sent it >> on >> to the next mailserver in the chain, which would be your ISP, and >> they >> looked at it, decided you were not a real server, and dropped it on >> the floor without comment. >> >> Now if you''re sending from a real server with an MX record and >> everything, then I have no idea. >> >> Walter > > Thank you for your reply. > IMO what you say is likely, but right now it''s somehow solved by > itself > :°) > A pity though, I would have known where was the catch. > > Thanks > LeoGiven what happened, I have yet another theory: My ISP (Speakeasy) uses a method they call "graylisting" to cut down on spam. When they receive an e-mail from an unknown or untrusted server, they send back the WAIT(RandomNumberOfSeconds) command. Any real mail server knows what to do with that, and they do. SpamBot2000 running on infected Windows XP boxen (but I repeat myself!) don''t, and the mail is dropped on the floor. You may have just encountered the RandomNumberOfSeconds here. When testing locally, I send to my MobileMe account, which seems to process all mail nearly instantaneously. My Speakeasy account and my Gmail account (which forwards into it) have the delay effect, so I never can tell if my mailer is working. Walter -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.