After looking dozens of threads inside - and outside - the forum and trying the suggested fixes, I've decided to open a new one regarding Gmail SMTP problems.

We've been using sendmail-f with no issues for 3 years, but suddenly the sent e-mail messages started to vanish or delay for hours (or even days). I contacted our hosting provider and they told me that the better option would be to send e-mails via SMTP, so did I. No success.

The error message I get:

Warning: strstr() [function.strstr]: Empty delimiter in /home/MYDOMAIN/public_html/includes/functions/functions_email.php on line 102

Warning: strstr() [function.strstr]: Empty delimiter in /home/MYDOMAIN/public_html/includes/functions/functions_email.php on line 103

Email Error: SMTP Error: Unable to connect to SMTP Server.
Those two warnings are not my actual problem (the aforementioned EMAIL_DISCLAIMER constant is correctly configured, as well as STORE_OWNER_EMAIL_ADDRESS), but the SMTP error.

ZC is configured like the following:

Code:
E-Mail Transport Method: smtpauth
E-Mail Linefeeds = LF
Use MIME HTML When Sending Emails = true
Send E-Mails = true
Email Archiving Active? = false
E-Mail Friendly-Errors = true
Email Address (Displayed to Contact you) = [email protected]
Email Address (sent FROM) = [email protected]
Emails must send from known domain? = No
Email Admin Format? = TEXT
Send Copy of Order Confirmation Emails To = [email protected]
Send Copy of Create Account Emails To - Status = 0
Send Copy of Create Account Emails To = [email protected]
Send Copy of Tell a Friend Emails To - Status = 0
Send Copy of Tell a Friend Emails To = [email protected]
Send Copy of Customer GV Send Emails To - Status = 0
Send Copy of Customer GV Send Emails To = [email protected]
Send Copy of Admin GV Mail Emails To - Status = 0
Send Copy of Customer Admin GV Mail Emails To = [email protected]
Send Copy of Admin Discount Coupon Mail Emails To - Status = 0
Send Copy of Customer Admin Discount Coupon Mail Emails To = [email protected]
Send Copy of Admin Orders Status Emails To - Status = 0
Send Copy of Admin Orders Status Emails To = [email protected]
Send Notice of Pending Reviews Emails To - Status = 0
Send Notice of Pending Reviews Emails To = [email protected]
Set "Contact Us" Email Dropdown List = Suporte em Português <[email protected]>, Soporte en Español <[email protected]>, English Support <[email protected]>
Allow Guest To Tell A Friend = false
Contact Us - Show Store Name and Address = 0
Send Low Stock Emails = 0
Send Low Stock Emails To = [email protected]
Display "Newsletter Unsubscribe" Link? = true
Audience-Select Count Display = true
SMTP Email Account Mailbox = [email protected]
SMTP Email Account Password = **************
SMTP Email Mail Host = smtp.gmail.com
SMTP Email Mail Server Port = 465
Convert currencies for Text emails = &pound;,£:&euro;,€

My company uses Google Apps as the standard e-mail solution. It means our e-mail addresses are [email protected] but all the backend processing is provided by Gmail - hence any configuration like port number, SSL/TLS, host name, and so on are the same as a standard Gmail account.

Using SMTP instead of SMTPAUTH does no good as well.

---------------------------------------------------------

Additional information

Code:
Info from my host:

Zen Cart version: 1.3.8a
SO: Linux 2.6.18-194.32.1.el5PAE
Database: MySQL 5.1.49-gpl-log
HTTP Server: Apache
PHP Version: 5.2.17 (Zend: 2.2.0)
TITLE_PHP_MEMORY_LIMIT 96M
TITLE_PHP_SAFE_MODE Off
TITLE_PHP_FILE_UPLOADS On
TITLE_PHP_UPLOAD_MAX 64M
TITLE_PHP_POST_MAX_SIZE 64M
TITLE_DATABASE_DATA_SIZE 157,474 kB
TITLE_DATABASE_INDEX_SIZE 28,751 kB

My host phpinfo():
http://whl0003.whservidor.com/phpinfo.php