On Monday, June 2, 2014 12:56:07 PM UTC-4, mike2r wrote:
>
>
>
> On Monday, June 2, 2014 10:10:10 AM UTC-4, Antonio Arcos wrote:
>>
>> Hello
>> I have a problem with the inquiries in my web page, I am using 
>> refineryCMS and I have configured for sending emails at my mail account. 
>> But it does not work and the log returns this error : "503 STARTTLS command 
>> used when not advertised".
>> If you need any file only ask me.
>> I hope your answers soon.
>>
>>
> Unfortunately, this could be a number of things.  We need to see how you 
> have your mail server set up in Rails.  You would have set it up in either 
> the application.rb or production.rb file.  You can XXX out any specific 
> server names, user names, and passwords, just need to see the configuration.
>
>
I got a private message with a copy of the production.rb file.  Sorry I'm 
delayed in responding to this.  The issue is in the following block:

ActionMailer::Base.smtp_settings={ }

These settings need to be defined for the smtp server.  It's possible you 
have them defined somewhere else (such as the application.rb file) in which 
case I would need to see the definition.  The error you're getting usually 
results from attempting to authenticate the mail server over an SSL 
connection.  It could be that your server doesn't support the AUTH method, 
or that it only supports a certain type of authentication which needs to be 
defined in the smtp settings.   For example, for Gmail accounts, it looks 
something like the following:

config.action_mailer.smtp.settings = {
    :address => "smtp.gmail.com",
    :port => 587,
    :domain => "mydomain.com",
    :user_name => "myusername"
    :password = > "mypassword"
    :authentication => :plain,
    :enable_starttls_auto => true
}

The error you are getting can come from an incorrect value for either of 
the last two parameters, authentication or startlls_auto.  It's also 
possible your mail server just doesn't support a secure connection, but 
that's where I would start looking.


 

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/e62896d1-f023-435d-9b72-69a664785d18%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to