1

The error that I get is:

Net::SMTPFatalError: 550 5.7.1 Unable to relay for [email protected]

I am using mail-2.3.0 With Ruby 1.9 on windows XP.

The exact code I used is:

require 'rubygems'
require 'mail'
Mail.deliver do
 from    '[email protected]'
 to      '[email protected]'
 subject 'Here is the image you wanted'
end

I don't understand what I am missing. Thanks for your help.

1 Answer 1

5

The error message comes from your SMTP server. Although this message can have many causes, it is most likely you forgot to provide the necessary authentication data to your SMTP server.

Taken from http://www.eudora.com/techsupport/kb/1593hq.html:

Most Internet Service Providers restrict access to their outgoing mail servers to prevent SPAM from being sent through their mail servers. If you are getting the "550 Relay Denied" error message, the outgoing mail server cannot verify who you are and will not allow you to send mail.

To configure Mail you have to prepare your own SMTP connection. See https://github.com/mikel/mail/wiki/Sending-email-via-google-smtp for an example.

You can get your username/password from your ISP (the one providing the SMTP server)

Sign up to request clarification or add additional context in comments.

2 Comments

@DR Is this the same if I am not using rails? how can I find out what my server requires as a login and authentication?
I'm sorry, I didn't read the tags carefully enough. The above example is Rails-specific. (removed)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.