Anna Golitsyna · Dec 11, 2020

%Net.SMTP and Gmail

I am trying to send email via

  • I am using an object of %Net.SMTP to do so.
  • I am giving it an object of class %Net.Authenticator to provide credentials to the gmail server.
  • I am not encoding the user name or password.
  • I have set the UseSTARTTLS property to 1
  • I have set the SSLConfiguration property to “API”
  • Since I am using TLS, I have set the port to be 587
  • I am using an object of %Net.MailMessage for the message
  • I am passing it to the Send method of the %Net.SMTP object to send the msg.
  • I get the following error: ERROR #6033: Error response to SMTP MAIL FROM: 530 5.7.0 c62sm7543742pfa.116 - gsmtp.

Are there any ideas of what I may be doing wrong?

0 410
Discussion (3)2
Log in or sign up to continue

Hi Anna,

This error points to an Authentication issue. I see only two areas where the problem could be:

1) Incorrect username/pw (unlikely as you probably already checked it)

2) Mismatched Certificate

I assume you created an SSL Configuration in System Administration on the Server that is sending the email. Did you add any Certificate file to that configuration? If you did, I would check the Common Name (CN) - is it set to ""?

I found a thread in which a setting in the Postfix configuration on the local server would cause a substitution of the CommonName with the Fully Qualified Domain Name obtained during DNS lookup - which was different from "" and resulted in a similar error:

@Vitaly Furman and @Alexander Koblov 
Hi Alexander and Vitaly,

Sorry for the delay in acknowledging your replies. This is still work in progress because it got superseded by other tasks. I'll let you know of the developments later.