Results 1 to 6 of 6

Thread: PHP and GMail - Long Shot (Hail Mary) Request

  1. #1
    Join Date
    Jul 2016
    Location
    Lebanon, TN
    Posts
    1,722

    PHP and GMail - Long Shot (Hail Mary) Request

    I'm a retired programmer, been through the ranks of COBOL, C, Pascal, Assembler and now primarily using PHP.

    I maintain a few motorcycle club related websites voluntarily. I developed these using PHP on the backend delivering HTML to the user.

    Recently, I've had issues sending emails from one of my sites, so I switched to using PHPMailer and sending via Gmail. I believe the site, that was having issues, may be on a shared server with another domain that may be Blacklisted.

    For about a year, using PHPMailer, the emails have been working well, but on 5/31/2022, Google decided that the use of their gmail needed OAUTH verification.

    This seemed a pretty straight forward change, set up credentials, client Id and Client Secret inside of Google for the gmail account and then use these credentials, from PHP, to complete the send email request.

    I've watched lots of YT videos and read lots of internet tutorials and pages, but I feel I'm missing one simple piece of the puzzle to get this process to work.

    Hence my request anyone here who may be able to help.

    Thanks
    Chris Edwards
    caedwards874 at gmail dot com

    (4 0 7) 9 0 2 1 3 5 8

  2. #2
    I have been out of the game a bit too long now to solve code problems. I primarily troubleshoot my existing projects now. My first thought is it's still tied to your host server. They have some sort of behind-the-scenes host setting that may be clobbering your code, or there is still something lurking around tied to the blacklisting. For years, I bounced around to different host servers and found a lot of the cheap, heavily-advertised ones oversell their shared server space and because they are so cheap, it's easy for spammers and scammers to rent space on stolen credit cards until they cause that server to be blacklisted. I was constantly having problems with my sites suddenly having troubles while hosting on those servers. I have been on a reliable host for around 10 years now and all those bizarre little problems have gone away.

    Is there any possibility you can test out your code on a different host server to see if your PHPMailer/Gmail code will work?
    I read recipes the same way I read science fiction. I get to the end and I think, "Well, that’s not going to happen."

  3. #3
    Join Date
    Jul 2016
    Location
    Lebanon, TN
    Posts
    1,722
    I can probably test it out on another domain, that is with the same host, but on a different server.

    But my issue is definitely with configuring Google gmail for the gmail account I'm using.

    I've setup my gmail account and generated the OAUTH Client Id and Client Secret. These are passed from my application to Google in order to receive an Access Token. In the example PHP script, to achieve this, it seems to get through 2 of the 3 phases and then hits a brick wall.

    I know I'm close...

  4. #4
    Join Date
    Mar 2018
    Location
    Moscow, ID
    Posts
    430
    If I remember right, Google does not allow third-party apps to send via a Gmail account by default. You have to log into the Gmail account via web browser and configure the security settings to allow sending via third party apps. We had that issue with our point of sale system, which sends via an HHMail server through a Gmail account.

  5. #5
    Join Date
    Jul 2016
    Location
    Lebanon, TN
    Posts
    1,722
    Yes it seems to be this verification, I'm having issue with, trying to find the actual places to configure this.

  6. #6
    Join Date
    Aug 2005
    Location
    Midwest
    Posts
    2,043
    Once you are blacklisted, it can take 30-45 days to be able to send emails through Gmail again after you have fixed the issue that caused you to be blacklisted in the first place. DAMHIKT

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •