Score:-3

How to make Drupal to login and send email via Gmail?

bb flag

I have a Drupal 9 website with a core contact form (I don't use Webform).

I have two Gmail accounts, one by which I want to send email and one to which I should receive the email.

So I need a way to make Drupal log in to my Gmail_account_1 and use it to send email (contact form inquiries) from it to my Gmail_account_2.

I think that in the Linux world this methodology is named sSMTP.

Score:1
cn flag

You can do this with the SMTP module, but Gmail has some odd configuration and you may run into issues, including having to manually log in to the Gmail account and check "allow insecure apps" every few weeks.

So I would recommend not doing this and instead using a professional mail service like SendGrid to send mail instead.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.