Command Line Email FAQ—simple answers to complex questions.
- Q: When trying to send email, I get "relaying access denied" or similar error message.
- A: For security reasons many SMTP servers, especially outside internal networks, reject all unrecognized connections and display the relaying denied message.
Authentication is required with an SMTP server. Otherwise, one of the following error messages will be displayed
"Couldn't send message, Server Response".
- 550 Relaying is prohibited.
- 550 5.7.1 Unable to relay.
- 550 Relaying denied.
- 554 Relay access denied.
The error messages may differ among various SMTP server products. The solution is to authenticate with the mail server, using AUTH parameter.
When SMTP authentication is required, use -AUTH AUTO command for automatic authentication. Also, a user name and a password has to be provided, using -USER and -PASS parameters.
febootimail -SERVER smtp.server.com -FROM email@example.com -TO firstname.lastname@example.org -TEXT Mail server authentication example -AUTH AUTO -USERNAME john -PASSWORD Joh2$8n
Authenticate with Gmail?
See example with Gmail authentication.
This article may be referenced as (KB ID: 516).
If you have any questions, please do not hesitate to contact our support team.