Skip to main content
Configuring SMTP email sending in Drupal with an OVH account

Sending emails from a Drupal site is essential for user notifications, contact forms, and password resets. By default, Drupal uses PHP's mail() function, which is unreliable and can result in emails being marked as spam. The recommended solution is to configure sending via an SMTP server, specifically with a professional OVH email account.

In this article, we will see how to configure Drupal to use an OVH email account in SMTP, using the SMTP module.

1 Install modules

The SMTP Authentication Support module is essential for managing email sending via SMTP.

composer require drupal/smtp

The mime mail module is also important because it allows you to send emails in HTML format.

composer require drupal/mimemail

Then start the installation.

drush smtp mimemail

3 Module configuration

The SMTP module configuration [ /admin/config/system/smtp ] is as follows:

  • SMTP server : ssl0.ovh.net
  • SMTP port : 587
  • Use encrypted protocol: Use TLS
  • Enable TLS encryption automatically: Yes
  • Timeout: 30
config Drupal SMTP OVH

 Next, you need to add the email account.

config SMTP drupal OVH

 

 The Mail system module configuration [ /admin/config/system/mailsystem ] is as follows:

  • Formatting tool: Mime mail Mailer
  • Sender: SMTP Mailer
  • Theme to render the emails: Current
config SMTP mail sytem

The configuration of the Mime Mail module [ /admin/config/system/mimemail ] is as follows:

Email format: Full HTML

config SMTP Mime Mail

 

 

Profile picture for user admin Stephane K

Écrit le

Il y'a 1 month
Modifié
Il y'a 3 days
Loading ...
WhatsApp
Support Habeuk : +237 694 900 622
WhatsApp Send