1

I have Drupal Open Social distribution running in Compute Engine on Google Cloud. Compute Engine is essencially a virtual machine, very similar to Amazon EC2.

I have installed the SMTP Authentication module, and am using a google email address to send email, but none of the test emails are working.

Here are the configuration choices for the SMTP Authentication Module:
Turn this module on or off: on
SMTP server: smtp.gmail.com
SMTP port: 465
Use encrypted protocol: Use SSL
Username: The Gmail address
Password: The Gmail password
E-mail from address: The Gmail address
E-mail from name: Default value
E-mail address to send a test e-mail to: Second Gmail address

When clicking Save configuration to send the email, Drupal returns the following error message: Unable to send email. Contact the site administrator if the problem persists.

How can virtual machine and Drupal be configured to send email?

closed as off-topic by leymannx, Shawn Conn, mradcliffe, Kevin, sanzante Oct 30 '18 at 19:39

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions on programming, PHP, SQL, etc. that do not relate directly to Drupal are off-topic here, but can be asked on Stack Overflow." – leymannx, Shawn Conn, mradcliffe, Kevin, sanzante
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    I believe the E-mail from address needs to be from your domain name and not Gmail. Ex: support@yourdomain.com the same domain you have set in /admin/config/system/site-information – No Sssweat Oct 27 '18 at 6:44
  • 1
    Using an individual GMail account as web email relay is going to be problematic ; it's likely to be flagged as spamming (since a human user won't be using the account). Use an email service provider (e.g. SendGrid, Mailgun, etc.) that will provide you a SMTP configuration that you can use for your Drupal setup. – Shawn Conn Oct 27 '18 at 20:16
1

Google will be blocked your application, check this note:

If you are using a program that Google does not consider secure, your usage will be blocked unless you enable less secure applications (a security setting that Google does not recommend). For more information see this link to determine the best approach for your mail client or application

https://www.digitalocean.com/community/tutorials/how-to-use-google-s-smtp-server

Not the answer you're looking for? Browse other questions tagged or ask your own question.