# Net::SMTPSyntaxError

**URL:** <https://www.ruby-forum.com/t/net-smtpsyntaxerror/134482>\
**Category:** Rails\
**Created:** [April 11, 2008, 8:40am UTC](https://www.ruby-forum.com/t/net-smtpsyntaxerror/134482 "2008-04-11T08:40:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![shikha](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/bcef8e/32.png) [@shikha](https://www.ruby-forum.com/u/shikha)\
**Post date:** [April 11, 2008, 8:40am UTC](https://www.ruby-forum.com/t/net-smtpsyntaxerror/134482/1 "2008-04-11T08:40:34Z")

</div>

Hey guys,  
I want to send an email via ROR and I have put this code at the very end  
in the config/environment.rb file-

ActionMailer::Base.delivery\_method = :smtp  
ActionMailer::Base.perform\_deliveries = true  
ActionMailer::Base.logger = nil  
ActionMailer::Base.raise\_delivery\_errors = true  
ActionMailer::Base.smtp\_settings = {  
:address =\> “[my smtp server]”,  
:port =\> 25,  
:domain =\> '[my domain],  
:authentication =\> :plain,  
:user\_name =\> ‘removed\_email\_address@domain.invalid’,  
:password =\> ‘[my password]’  
}

but when i click on send mail button, it shows following error:

Net::SMTPSyntaxError in MailingController#sendmail

502 unimplemented (#5.5.1)

RAILS\_ROOT: C:/work/2phone  
Application Trace | Framework Trace | Full Trace

c:/ruby/lib/ruby/1.8/net/smtp.rb:680:in `check_response' c:/ruby/lib/ruby/1.8/net/smtp.rb:582:in`auth\_login’  
c:/ruby/lib/ruby/1.8/net/smtp.rb:686:in `critical' c:/ruby/lib/ruby/1.8/net/smtp.rb:581:in`auth\_login’  
c:/ruby/lib/ruby/1.8/net/smtp.rb:571:in ` __send__' c:/ruby/lib/ruby/1.8/net/smtp.rb:571:in`authenticate’  
c:/ruby/lib/ruby/1.8/net/smtp.rb:411:in `do_start' c:/ruby/lib/ruby/1.8/net/smtp.rb:378:in`start’  
c:/ruby/lib/ruby/1.8/net/smtp.rb:316:in `start' c:/ruby/lib/ruby/gems/1.8/gems/actionmailer-2.0.2/lib/action_mailer/base.rb:586:in`perform\_delivery\_smtp’  
c:/ruby/lib/ruby/gems/1.8/gems/actionmailer-2.0.2/lib/action\_mailer/base.rb:469:in  
` __send__' c:/ruby/lib/ruby/gems/1.8/gems/actionmailer-2.0.2/lib/action_mailer/base.rb:469:in`deliver!’  
c:/ruby/lib/ruby/gems/1.8/gems/actionmailer-2.0.2/lib/action\_mailer/base.rb:352:in  
`method_missing' app/controllers/mailing_controller.rb:8:in`sendmail’

Please help me out from this problem, i have got stuck due to this

Thanks

---

<div class="post-metadata">

**Author:** ![shikha](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/bcef8e/32.png) [@shikha](https://www.ruby-forum.com/u/shikha)\
**Post date:** [April 11, 2008, 8:42am UTC](https://www.ruby-forum.com/t/net-smtpsyntaxerror/134482/2 "2008-04-11T08:42:21Z")

</div>

Please also tell me the requirements for sending mail, if i am missing  
something. any gems, settings or …

Thanks
