"Authentication failed" when third party smtp server is used

Hello,
I am using action mailer to send mails. I need to use a third party
smtp server. The third party smtp server i am using is authsmtp.

ActionMailer::Base.smtp_settings = {
:address            => "mail.authsmtp.com",
:domain             => "mydomain.com",
:port                 =>   2525,
:authentication   =>  "login",
:user_name        => "[email protected]",
:password          =>  "password for [email protected]"

}

when i try to send the mail, i get authentication failed error. but if i
change the :address to mail.mydomain.com everything works fine.
I want to use authsmtp to send mail

I think i also have to authenticate the authsmtp server.I have its
username and password. Where do i have to write that.

Any idea whats going wrong.
Please help
Thank you.

On Apr 17, 5:01 pm, Ank Ag [email protected] wrote:

when i try to send the mail, i get authentication failed error. but if i
change the :address to mail.mydomain.com everything works fine.
I want to use authsmtp to send mail

I think i also have to authenticate the authsmtp server.I have its
username and password. Where do i have to write that.

You should be using that username and password in your smtp settings.

Fred