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

August 20, 2015 5.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?

  • Show 2 more comments
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.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!