1

I tried to use this example to send email to my smtp account at gmail. I know that, in order to use the gmail smtp server, you usually need a valid username/password combination, but other smtp servers (e.g. hotmail) need to be able to send mail to gmail and they have no knowledge of passwords. My question is, is it possible to send mail to a gmail account without knowing the gmail password. The error code was:

curl: (55) MAIL failed: 530
user1095108
  • 239
  • 2
  • 10

2 Answers2

1

curl is not a mailserver (or message transfer agent). To my understanding it acts as an mail user agent (MUA) - "email client" - and it rather connects to a mailserver to hand over your mail to the SMPT server which then sends it to the recipients MTA (via relays if necessary). Or as the example you have linked puts it:

curl supports sending data to a an SMTP server, which combined with the right set of command line options makes an email get sent to a set of receivers of your choice.

An SMTP server may choose to not deliver your outbound mail unless you authenticate yourself as a legimitate client to prevent spam and other abuse of the server.

Ghanima
  • 15,958
  • 17
  • 65
  • 125
0

It's possible, just not over the usual smtp.gmail.com server. What I did was an MX lookup on gmail.com and you get a slew of servers, I picked this one:

gmail-smtp-in.l.google.com  

and the security there is rather more lax, no need for TLS/SSL and no need for a password.

user1095108
  • 239
  • 2
  • 10