# 501 Bad address syntax:: when using Action Mailer

**URL:** <https://www.ruby-forum.com/t/501-bad-address-syntax-when-using-action-mailer/112873>\
**Category:** Rails\
**Created:** [August 24, 2007, 1:38am UTC](https://www.ruby-forum.com/t/501-bad-address-syntax-when-using-action-mailer/112873 "2007-08-24T01:38:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![wmerydith](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/ccd318/32.png) [@wmerydith](https://www.ruby-forum.com/u/wmerydith)\
**Post date:** [August 24, 2007, 1:38am UTC](https://www.ruby-forum.com/t/501-bad-address-syntax-when-using-action-mailer/112873/1 "2007-08-24T01:38:53Z")

</div>

Trying to debug a mail problem.

We’re seeing the error “501 Bad address syntax” when trying to send  
mail. Our mail is hosted by Dreamhost and our config is as follows:

* * *

ACTIVATION\_EMAIL\_ADDRESS = “removed\_email\_address@domain.invalid”

ActionMailer::Base.delivery\_method = :smtp  
ActionMailer::Base.smtp\_settings = {  
:address =\> “[mail.foo.domain.com](http://mail.foo.domain.com)”,  
:port =\> 587,  
:domain =\> “[foo.domain.com](http://foo.domain.com)”,  
:user\_name =\> ACTIVATION\_EMAIL\_ADDRESS,  
:password =\> “password”,  
:authentication =\> :login  
}

## ActionMailer::Base.perform\_deliveries = true ActionMailer::Base.raise\_delivery\_errors = true ActionMailer::Base.default\_charset = “utf-8”

FYI - if I change to the password to something incorrect we get the  
error: 535 Error: authentication failed.

Thanks for any help.

---

<div class="post-metadata">

**Author:** ![wmerydith](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/ccd318/32.png) [@wmerydith](https://www.ruby-forum.com/u/wmerydith)\
**Post date:** [October 27, 2007, 11:45am UTC](https://www.ruby-forum.com/t/501-bad-address-syntax-when-using-action-mailer/112873/2 "2007-10-27T11:45:30Z")

</div>

Hi Will,

I am new to ROR and facing the same problem. I have also used the same  
kind of smtp settings…

Please let me know if you have found the solution for this issue.

Email Address - removed\_email\_address@domain.invalid

Thanks In advance.

Neha

Will M. wrote:

> Trying to debug a mail problem.
> 
> We’re seeing the error “501 Bad address syntax” when trying to send  
> mail. Our mail is hosted by Dreamhost and our config is as follows:
> 
> * * *
> 
> ACTIVATION\_EMAIL\_ADDRESS = “removed\_email\_address@domain.invalid”
> 
> ActionMailer::Base.delivery\_method = :smtp  
> ActionMailer::Base.smtp\_settings = {  
> :address =\> “[mail.foo.domain.com](http://mail.foo.domain.com)”,  
> :port =\> 587,  
> :domain =\> “[foo.domain.com](http://foo.domain.com)”,  
> :user\_name =\> ACTIVATION\_EMAIL\_ADDRESS,  
> :password =\> “password”,  
> :authentication =\> :login  
> }
> 
> ## ActionMailer::Base.perform\_deliveries = true ActionMailer::Base.raise\_delivery\_errors = true ActionMailer::Base.default\_charset = “utf-8”
> 
> FYI - if I change to the password to something incorrect we get the  
> error: 535 Error: authentication failed.
> 
> Thanks for any help.

---

<div class="post-metadata">

**Author:** ![wmerydith](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/ccd318/32.png) [@wmerydith](https://www.ruby-forum.com/u/wmerydith)\
**Post date:** [October 27, 2007, 11:52am UTC](https://www.ruby-forum.com/t/501-bad-address-syntax-when-using-action-mailer/112873/3 "2007-10-27T11:52:02Z")

</div>

You haven’t shown us the interesting bit: when you actually try and  
send the email  
Fred
