C4f1151075b447779af31e99d6cf70e2c6eb47ac
By:
newbie

cant set gmail for my php applicaiton. Gmail prevent all signin attempts from my server

August 20, 2015 3.7k views
PHP Email

i have a php application from where users can send email notification to their customers. users can send email using their yahoo or other email hosting but they are having problem on gmail and hotmail. when they try to authenticate their gmail address gmail simply disallow it. when i check gmails device activity and notifications section for that email address, i found "Sign-in attempt prevented by Google" for all the requests from my server ip.

how can i resolve this issue?

6 comments
  • Is it an option to instead use a mail sending service such as SendGrid?

  • @jsamuel
    thanks for your reply. but i dont want use any other service at the moment.

    i m trying to use simple php mailer to send emails of my user. my users can add other email address except gmail.

  • @newbie I think i know the issue with Gmail, but not necessarily Hotmail... I'll look into the hotmail side. Anyways, for Gmail: https://support.google.com/accounts/answer/6010255?hl=en <--- follow those instructions if you control all the applicable gmail accounts or have your customers do it to allow your server to properly send emails from gmail. Apparently, Google wants OAuth2.0 implementations instead of POP3, IMAP, and SMTP which a lot of Mail Client developers are fighting tooth and nail because of the implications from implementation. I will look at hotmail's stuff but it's probably similar.

  • @delrakkin254
    thanks a lot for your reply.

    i have been trying all the solutions and got lucky only once.

    by the way, can you point me any tutorial how can i implement OAuth2.0 for my application?

  • @newbie lemme see what i can find... Outlook.com doesn't seem to implement something that would cause this so I'm stumped on that.

  • @newbie I found a link you'll find useful. I don't know your exact PHP implementation but here's the OAuth2.0 webpage: http://oauth.net/2/ ... Scroll down to Client Libraries and that should give you some idea.

1 Answer

This question was answered by @vedalken254:

@newbie I think i know the issue with Gmail, but not necessarily Hotmail... I'll look into the hotmail side. Anyways, for Gmail: https://support.google.com/accounts/answer/6010255?hl=en <--- follow those instructions if you control all the applicable gmail accounts or have your customers do it to allow your server to properly send emails from gmail. Apparently, Google wants OAuth2.0 implementations instead of POP3, IMAP, and SMTP which a lot of Mail Client developers are fighting tooth and nail because of the implications from implementation. I will look at hotmail's stuff but it's probably similar.

View the original comment

Have another answer? Share your knowledge.