Send mail via google app with smtp relay

こ雲淡風輕ζ 提交于 2021-02-08 05:10:12

问题


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.

enter image description here

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!