Setting up Drupal 6 to use Gmail for email functionality

I’m trying to get Drupal 6 to work with Gmail’s IMAP service but I’m running into some issues. When I try to send an email from Drupal, I get error messages about needing to use STARTTLS first. I’ve set up my PHP.ini file with the Gmail SMTP server and port 587, but it’s still not working.

Here’s what I’ve done so far:

[email_config]
smtp_server = 'smtp.gmail.com'
port_number = 587
sender_address = '[email protected]'

Does anyone know what I’m missing? Do I need to change any other settings in Drupal or my server config? I’m using Windows if that makes a difference.

I’d really appreciate any help or tips to get this working. Thanks!

I encountered a similar issue when setting up Drupal 6 with Gmail. One crucial step you might be missing is configuring the SMTP Authentication module. Install and enable this module, then navigate to admin/settings/smtp. Set the SMTP server to ‘smtp.gmail.com’, port to 587, and enable ‘Use SMTP authentication’. Enter your full Gmail address and password in the respective fields. Also, ensure you’ve allowed less secure apps in your Google account settings or set up an app-specific password. This combination should resolve the STARTTLS error and get your email functionality working smoothly.

I’ve been through this exact headache with Drupal 6 and Gmail. Here’s what finally worked for me:

First, double-check your PHP settings. Make sure you have OpenSSL enabled and the correct SMTP settings in php.ini.

Next, install the SMTP Authentication Support module if you haven’t already. It’s crucial for handling Gmail’s security requirements.

In Drupal’s SMTP settings (admin/settings/smtp), use these:

  • SMTP server: smtp.gmail.com
  • SMTP port: 587
  • Use SMTP authentication: Yes
  • Username: Your full Gmail address
  • Password: Your Gmail password or an app-specific password

Don’t forget to enable ‘Allow less secure apps’ in your Google account settings. If that doesn’t work, try creating an app password instead.

Lastly, clear Drupal’s cache and test sending an email. This setup should resolve the STARTTLS issue and get your emails flowing.

hey sparklinggem, have u tried enabling SSL in ur php settings? sometimes that solves the STARTTLS issue. also, make sure ur using the latest version of PHPMailer if u haven’t already. it handles gmail’s security better. good luck with ur setup!