address = 'smtp.zoho.com'
domain = 'suptheapp.com'
password = 'password'
port = 587
msg = "Subject: Hi There!\n\nThis works, and this part is in the body."
smtp = Net::SMTP.new address, port
smtp.enable_starttls
smtp.set_debug_output $stderr
smtp.start(domain, account, password, :login) do
end
I have this error while trying to write a ruby script to send email using zoho smtp server. Any idea?
/Users/vietnguyen/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/net/smtp.rb:963:in `check_auth_response': 535 Authentication Failed (Net::SMTPAuthenticationError)
from /Users/vietnguyen/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/net/smtp.rb:751:in `auth_login'
from /Users/vietnguyen/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/net/smtp.rb:732:in `authenticate'
from /Users/vietnguyen/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/net/smtp.rb:567:in `do_start'
from /Users/vietnguyen/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/net/smtp.rb:520:in `start'
from send_assignment.rb:14:in `send_assignments'
from send_assignment.rb:19:in `<main>'