Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

Gmail issues with POP/IMAP and SMTP

Hello, I've browsed these forums and elsewhere online extensively and tried about every solution I could find and I'm still experiencing issues with Gmail's configuration. I'm running OS Ticket 1.9.14.

We have 2 Google Apps for Business accounts. The account I'm trying to configure is I'm experiencing the following issues:
  1. Fetching will not work. When I enter the information on the SCP > Emails > Emails page, it takes a few minutes (Loading...) then gives the following error: Invalid login. Check IMAP settings.
  2. SMTP seems to send to about any domain but Company B. I get delivery failure notices from Gmail when sending to Company B, but for whatever reason instead of showing the address I put in OS Ticket, the failure shows the recipient as instead of This may be a Gmail issue, I have no idea, but I have not experienced this with any other device or Gmail account in either company.

When I try to edit the settings for the support account ( under SCP > Emails > Emails, the username and password are correct and I've tried the following settings under Fetching Email and Sending Email (both marked Enable):

Fetching: (port 993, protocol IMAP + SSL and IMAP) (port 995, protocol POP + SSL and POP)

ssl:// (port 465, auth required)
ssl:// (port 465, auth required) (port 465 and 587, auth required) (port 465 and 587, auth required) (port 465 and 587, auth required and auth not required)
ssl:// (same as above)
ssl:// (same as above)

I've tried using Gmail's smtp-relay functionality to get it to send properly, but that hasn't worked, either (I followed Google's guide including entering the IP of the server in Gmail's configuration pages, etc.).

I've also made sure that the account has permission to use less secure apps, IMAP and POP is allowed, and have filled out the Captcha that sometimes snares Gmail accounts as spam. I've also made sure that Company B is whitelisted in Company A's Gmail settings. I can send from Company A - B and vice versa fine, but cannot from OS Ticket. I use PHP Swift Mailer for IMAP use elsewhere within my domain, and have the PHP IMAP extension installed, so it doesn't seem to be an issue of the server being able to communicate over IMAP with Gmail. If this is a Gmail issue then I'll take it up with them, but I'm pretty sure I should be able to at least fetch email.

Any ideas or suggestions? I really love OS Ticket and hope we can use it, I just need to figure out why Gmail isn't playing nice.


  • I have noticed that in my version, the email configuration page will momentarily read the DB value for user ID and password, but then immediately overwrites it with some hard-coded default.  I think there's 'a bug there.  No matter how often I try to set the value, it sets the screen back to a user of ostadmin and some password.  I believe the validation test uses the value placed on the screen, rather than the DB value.  So it fails, and thus nothing is properly saved to the DB.

    I get that I'm guessing a lot about the background functioning of that page.

    I had to edit the DB by hand to save the IMAP and SMTP settings (the ost_email table) before it would begin to work.

  • I think that you will find that you need to allow Gmail "access to less secure apps" to get it to work.

    You will also have to allow your Gmail account to Enable IMAP Access in your account > settings > Forwarding and POP/IMAP

    These settings work for me: with port 993, IMAP+SSL
    ssl://, port 465, Auth required

Sign In or Register to comment.