问题
My application in asp.net with c#, from application some notification email sent daily (more then 500). We have change mail hosting to Google mail app. For sending mail I was using smtp host “smtp.gmail.com” and it was work fine, but it has limit of 99 so after that its gives below error:
Error : Mailbox unavailable. The server response was: 5.4.5 Daily sending quota exceeded. qa15sm12740316pab.12 – gsmtp
So I have configure smtp relay as per the article https://support.google.com/a/answer/2956491
I have configured smtp mail settings as below:
<smtp from="from emai>">
<network host="smtp-relay.gmail.com" enableSsl="true" password="password" userName="username" />
</smtp>
Now i am getting below errors, and mail is not sending.
Error : Mailbox unavailable. The server response was: 5.7.1 Invalid credentials for relay [xxx.xxx.xxx.xxx] gsmtp
I have setup SMTP relay service from Google Apps Admin Console and also added to IP address of server (please see below image). also i have tried to unchecked the "Required SMTP Authentication" check-box.
Can anybody help me how to resolve this issue?
Let me know if i missed anything.
Thank you in advance.
回答1:
You can untick 'Require SMTP Authenticaton' and in web.config
remove userName
and password
. It will work.
来源:https://stackoverflow.com/questions/30046227/send-mail-via-google-app-with-smtp-relay