Automated messaging of users on thier listed email

Is it allowed to send e-mails to users in an automated way to advertise projects or no?

Specifically:

  1.  Is it something that goes against the Code of Conduct?
  2. Is it something that results in a flag or permanent ban?