Try using something like mailgun to send emails instead of gmail.
Additionally, You can use ./discourse-doctor to be sure that gmail is causing the email failure.
Nb: the email would probably be failing because the sending email does not match the discourse notification email and hence rejected.