ArgumentError: SMTP-AUTH requested but missing user name + ActionMailer
Asked Answered
F

1

5

I m not able to sent mail using actionmailer everytime I try to deliver the mail using actionmailer It report me with error

ArgumentError: SMTP-AUTH requested but missing user name

This is Strange as I'm able to sent mail via Telnet but not using ActionMailer

Attaching Telnet Screenshot

Here my SMTP settings

config.action_mailer.delivery_method = :smtp

config.action_mailer.smtp_settings = {
    :address => '216.224.183.100',
    :port                 => 25,
    :domain               => '[domain_name]',
    :username             => "[username]",
    :password             => "[password]",
    :authentication       => 'plain',
   :enable_starttls_auto => true
 }

Can anyone Please tell as to via the Mail is not getting sent

enter image description here

Faro answered 4/8, 2012 at 6:16 Comment(3)
Um, why did you not redact the correct username and password from the picture? Only the incorrect ones.Binaural
Your telnet session is not using STARTTLS while your code explicitly requests it. You are not testing the same thing.Binaural
@Binaural that not the case as I tried removing the enable tls key and send message again same error also tried by deleting authentication key still no luckFaro
F
18

Got it. It's user_name, and not username.

Faro answered 4/8, 2012 at 11:56 Comment(1)
Goodness, just spent 30 minutes trying to figure out my problem, and this was it.Saraisaraiya

© 2022 - 2024 — McMap. All rights reserved.