Make sure that you don't have any forwardings, routings or autoresponders configured in the email account which you connect to FreeScout (same applies to support agent emails). As it may cause infinite email loops like in this or this case.
Troubleshooting Fetching
- Check Fetching Emails errors in "Manage » Logs".
- Check fetch-emails.log in "Manage » Logs » App Logs".
- Try to disable "Validate Certificate" option in Fetching settings.
- If your mail server requires "TLS" Encryption try "TLS (+StartTLS)" and vice versa.
- Go to "Manage » System » Tools", click "Fetch Emails" and check the output. You can also set "Debug" checkbox to see full IMAP communication log.
- Make sure that
schedule:run
cron job is configured are running inSystem » Status
. Some shared hostings may require to specify full path to the PHP executable (for example,/usr/local/bin/php-7.2
). - Check
freescout fetch-emails
jobs viahtop
tool and if there are multiple or old processes - kill them via "Kill" menu. - If emails are still not being fetched try to clear cache.
- If your mail server does not like frequent connections try to increase "Fetch Mail Schedule" option in "Manage » Settings » Mail Settings".
- Make sure that something does not mark emails as "READ" in your mail server. Background fetching fetches only unread emails (see this issue).
Common Issues
— imap_open(): Couldn't open stream {example.org:143/imap/novalidate-cert}. TLS/SSL failure for example.org: SSL negotiation failed
Try to change TLS to SSL or vice versa (https://stackoverflow.com/a/72376387). Also see the solution here.
If you are using Microsoft Exchange on premises, make sure that ImapProxy
and PopProxy
components are active in your Microsoft Exchange (see this issue).
— connection setup failed
Mail service may have limitations on number of connections per minute. So if you have a lot mailboxes from time to time your mail service may block IMAP connection. You can adjust Fetching interval in "Manage » Mail Settings".
This error may be seen from time to time when using Microsoft Office 365 (see this discussion).
— connection setup failed: Authentication failed
Check your IMAP login and password.
Also sometimes Microsoft Exchange IMAP connection may simply stop working throwing this error (like in this issue). In this case try to delete that account in your mail server and re-add it to FreeScout.
— connection failed - stream_socket_client(): Unable to connect to ssl://imap.gmail.com:993 (Connection timed out)
This error may happen if your server can not resolve your mail server host name into IP address (see this). Also make sure that your hosting provider has not blocked IMAP/POP3 ports.
— imap_open(): Couldn't open stream {mydomain.com:993/imap/ssl}. Can not authenticate to IMAP server: [CLOSED] IMAP connection broken (authenticate)
— imap_open(): Couldn't open stream {imap.gmail.com:993/imap/novalidate-cert/ssl}. No such host as imap.gmail.com
These errors indicate a connection issue between your server and mail server.
— imap_open(): Couldn't open stream {imap.gmail.com:993/imap/novalidate-cert/ssl}. Retrying PLAIN authentication after [AUTHENTICATIONFAILED]
Sometimes Google Workspace can ban your server's IP address - see this issue. In this case contact Google Workspace support.
— imap_open(): Couldn't open stream {mail.myserver.domain:587/imap/tls}. [CLOSED] IMAP connection broken
Solution is described here
— 'Allowed memory size of NNN bytes exhausted' error when fetching large attachments
Increase memory_limit
value in php.ini. Keep in mind that console PHP may have it's own php.ini file.
— IMAP connection broken (server response)
See the solution here and discussion here.
— Error: Unexpected characters at end of address
See the solution here.
Checking EML file
If you have EML file of an email and would like to check how FreeScout would parse it do the following:
- Put the file into /storage/logs/email.eml
- Run the following console command and check the output:
php artisan freescout:parse-eml --mailbox=YOUR-MAILBOX-ID
Mail Providers Configuration
Google Workspace (G Suite)
Syncing via oAuth is not possible.
- Protocol: IMAP
- Server: imap.gmail.com
- Port: 993
- Username: your-email@gmail.com
- Password: App-Specific Password
- Encryption: SSL
- As G Suite admin in "Apps -> G Suite -> Settings for Gmail -> End User Access" make sure that POP and IMAP access is enabled.
- Enable 2-Step Verification, create an App Password and use it in FreeScout (read more). According to G Suite support App Passwords will work forever - this authentication method will not be deprecated in the future.
- Log in as a user in Gmail and enable IMAP in
Settings --> Forwarding and POP/IMAP
. - In FreeScout, confirm that the "Encryption" dropdown at
Mailbox Settings --> Connection Settings --> Fetching Emails
is set to "SSL" as opposed to "TLS".
New GSuite accounts may receive the following error: imap_open(): Couldn't open stream {imap.gmail.com:993/imap/ssl}. Retrying PLAIN authentication after [ALERT] Please log in via your web browser: support.google.com/mail/acco; (see this issue). Just wait for a day and it will disappear.
Gmail
Syncing via oAuth is not possible.
- Protocol: IMAP
- Server: imap.gmail.com
- Port: 993
- Username: your-email@gmail.com
- Password: App-Specific Password
- Encryption: SSL
- Enable 2-Step Verification, create an App Password and use it in FreeScout (read more). According to Google support App Passwords will work forever - this authentication method will not be deprecated in the future.
- In Gmail enable IMAP in "Settings -> Forwarding and POP/IMAP -> IMAP access".
Possible Issues
— imap_open(): Couldn't open stream {imap.gmail.com:993/imap/ssl}. Retrying PLAIN authentication after [ALERT] Please log in via your web browser: support.google.com/mail/acco;
Allow Unknown device at https://myaccount.google.com/u/1/device-activity
You may also need to do Google's "Captcha Unlock" (https://accounts.google.com/DisplayUnlockCaptcha) to unblock FreeScout from Gmail if you are getting this error.
If you keep getting this error over and over, make sure you turn on 2FA in your Google account and set up an "App Specific Password" for FreeScout. Google seems less likely to block FreeScout using this method.
— imap_open(): Couldn't open stream {imap.gmail.com:993/imap/ssl}. Certificate failure for imap.gmail.com
This happens due to some issues on your hosting provider, just disable Validate Certificate
option on Fetching page.
— imap_open(): Couldn't open stream {imap.gmail.com:993/imap/novalidate-cert/ssl}. Retrying PLAIN authentication after [AUTHENTICATIONFAILED]
Sometimes Google Workspace can ban your server's IP address - see this issue. In this case contact Google Workspace support.
Microsoft 365 Office Exchange
- Protocol: IMAP
- Server: outlook.office365.com
- Port: 993
- Encryption: SSL
Follow this instruction for OAuth.
Zoho Mail
Fetching from Zoho Mail via POP3 does not work (see this issue). Switch Zoho settings to allow IMAP connections, then set up FreeScout to retrieve via IMAP.
About
Installation
Configuration
- Sending Emails
- Fetching Emails
- Connect G Suite & Microsoft 365
- Console Commands
- Backup
- Update
- Upgrade PHP
Troubleshooting
Tools & Integrations
- API
- Migrate to FreeScout
- Zapier
- Make (Integromat)
Development
FreeScout — Help desk & shared mailbox, free Zendesk & Help Scout alternative.