I get this when trying to send out an email. What exactly does this error mean? ________________________________________ Net::SMTPSyntaxError (501 <>: missing or malformed local part ): /usr/lib/ruby/1.8/net/smtp.rb:680:in `check_response'' /usr/lib/ruby/1.8/net/smtp.rb:653:in `getok'' /usr/lib/ruby/1.8/net/smtp.rb:635:in `rcptto'' /usr/lib/ruby/1.8/net/smtp.rb:546:in `send0'' /usr/lib/ruby/1.8/net/smtp.rb:545:in `send0'' /usr/lib/ruby/1.8/net/smtp.rb:472:in `sendmail'' /usr/lib/ruby/gems/1.8/gems/actionmailer-1.2.5/lib/action_mailer/base.rb:513:in `perform_delivery_smtp'' /usr/lib/ruby/1.8/net/smtp.rb:379:in `start'' /usr/lib/ruby/1.8/net/smtp.rb:316:in `start'' /usr/lib/ruby/gems/1.8/gems/actionmailer-1.2.5/lib/action_mailer/base.rb:511:in `perform_delivery_smtp'' /usr/lib/ruby/gems/1.8/gems/actionmailer-1.2.5/lib/action_mailer/base.rb:397:in `deliver!'' /usr/lib/ruby/gems/1.8/gems/actionmailer-1.2.5/lib/action_mailer/base.rb:291:in `method_missing'' /app/controllers/workout_controller.rb:58:in `notifyNewWorkout'' -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Matias Surdi
2006-Aug-28 11:55 UTC
Re: SMTPSyntaxError (501 <>: missing or malformed local part)
I think that you are entering some mail addres (to or from) in the wrong format. They usually are something like: "This is my name" <myname-3Q2Tfjf0mexWk0Htik3J/w@public.gmane.org> Jim Jones escribió:> > I get this when trying to send out an email. What exactly does this > error mean? > ________________________________________ > > Net::SMTPSyntaxError (501 <>: missing or malformed local part > ): > /usr/lib/ruby/1.8/net/smtp.rb:680:in `check_response'' > /usr/lib/ruby/1.8/net/smtp.rb:653:in `getok'' > /usr/lib/ruby/1.8/net/smtp.rb:635:in `rcptto'' > /usr/lib/ruby/1.8/net/smtp.rb:546:in `send0'' > /usr/lib/ruby/1.8/net/smtp.rb:545:in `send0'' > /usr/lib/ruby/1.8/net/smtp.rb:472:in `sendmail'' > /usr/lib/ruby/gems/1.8/gems/actionmailer-1.2.5/lib/action_mailer/base.rb:513:in > `perform_delivery_smtp'' > /usr/lib/ruby/1.8/net/smtp.rb:379:in `start'' > /usr/lib/ruby/1.8/net/smtp.rb:316:in `start'' > /usr/lib/ruby/gems/1.8/gems/actionmailer-1.2.5/lib/action_mailer/base.rb:511:in > `perform_delivery_smtp'' > /usr/lib/ruby/gems/1.8/gems/actionmailer-1.2.5/lib/action_mailer/base.rb:397:in > `deliver!'' > /usr/lib/ruby/gems/1.8/gems/actionmailer-1.2.5/lib/action_mailer/base.rb:291:in > `method_missing'' > /app/controllers/workout_controller.rb:58:in `notifyNewWorkout'' >--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@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 -~----------~----~----~----~------~----~------~--~---
Jim Jones
2006-Aug-28 16:09 UTC
Re: SMTPSyntaxError (501 <>: missing or malformed local part
How can I catch this so that when my function fails, I can just move on to the next user? My email function looks like this: class NewWorkoutNotify < ActionMailer::Base def notify_new_workout(user) # Email header info MUST be added here @recipients = user.email @from = "xxx-dJY9qJdb8EU@public.gmane.org" @subject = "New Workout Ready" # Email body substitutions go here @body["login"] = user.login end end Matias Surdi wrote:> I think that you are entering some mail addres (to or from) in the wrong > format. > > They usually are something like: > > "This is my name" <myname-3Q2Tfjf0mexWk0Htik3J/w@public.gmane.org> > > > > Jim Jones >escribigt;-- 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-/JYPxA39Uh5TLH3MbocFFw@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 -~----------~----~----~----~------~----~------~--~---
Anthony Altemara
2008-Sep-12 17:09 UTC
Re: SMTPSyntaxError (501 <>: missing or malformed local part
I had this error when I screwed up the ''recipients XXXXXX'' line in my mailer model. I had ''recipients = XXXXXX'' instead of ''recipients XXXXXX'' I found this by adding some logger.info statements in: /usr/lib/ruby/gems/1.8/gems/actionmailer-2.1.1/lib/action_mailer/base.rb ...in the deliver! method. I then saw that there were no recipients being given to net::smtp Good luck! Something that may also help debugging, you can hack /usr/lib/ruby/1.8/net/smtp.rb and add a few print statements inside get_response, recv_response, and getok, in order to see what is actually coming to and from the SMTP server. This helped me immensely. Be warned however, as this will cause ugly text to be printed on every app on your server that uses these libraries. -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Anthony Altemara
2009-Oct-23 01:23 UTC
Re: SMTPSyntaxError (501 <>: missing or malformed local part
I have seen this error as well, and found the problem to be the email address having a leading ''space''. For example, I was passing an email address like this: " Bob Smith <bob.smith-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>" and was getting the error. As soon as I stripped the space away with ''.strip'' before I assigned it to ''recipients'', the error went away. Not sure which part of the code (gem or ruby) was choking on the whitespace. I didn''t investigate further. I am using Action::Mailer 2.2.2. -- Posted via http://www.ruby-forum.com/.