Have your Drupal website send emails that always arrive

Recognize the problem that your Drupal website is not sending emails? For example, when there's a (security) update or when someone has filled out a Webform. In this blog, I'll show you in a few simple steps how to ensure that the emails your Drupal website sends always get delivered.
Robert Roose
Door Robert Roose

Have your Drupal website send emails that always arrive

Use a free email service: Sendgrid

First, you need to create an account with Sendgrid. This is a service that allows you to send transactional emails from any website. The advantage is that Sendgrid is free if you send less than 100 emails per day from your Drupal website. For the average Drupal website, this is usually more than enough. Only when you have a community or intranet website with many users is there a chance that you'll exceed this limit. This is because you'll be sending emails like updates on what's happening within the community or for users who sign up or forget their passwords. This quickly adds up.

  1. Create an account on Sendgrid
  2. Login to Sendgrid
  3. On the left, choose 'Settings > API Keys'
  4. Click on the 'Create API Key' button in the upper right
  5. Enter a name for the API key. You can choose any name that is recognizable to you, such as the name of your Drupal website
  6. Select 'Full Access' and click on the 'Create and view' button in the lower right
  7. Next, you'll see a long string of characters. You'll need this when setting up your Drupal website, so copy it (by clicking on the string) and save it somewhere
  8. Click on the 'Done' button

Hulp nodig bij het maken van je Drupal website?

Met meer dan vijftien jaar Drupal ervaring ken ik honderd plus Drupal modules en weet ik hoe je deze moet configureren. Dit bespaart je programmeerwerk en dus kosten! Stuur een email naar [email protected] of bel 06 3029 2641 om te kijken hoe we kunnen samenwerken!

SMTP module for Drupal

Next, we will install and configure the SMTP module, which replaces and enhances Drupal's built-in PHP mail function.

  1. Install the SMTP module. Learn more about installing Drupal modules.
  2. To enable the SMTP module, navigate to 'Extend > Install new module' in the Drupal backend.
  3. To configure the SMTP module, go to 'Configuration > System > SMTP Authentication Support.'
  4. Set 'SMTP as the default mailsystem' to 'On.'
  5. For 'SMTP server,' enter 'smtp.sendgrid.net.'
  6. Choose '587' as the SMTP port.
  7. Under 'SMTP Authentication,' enter 'apikey' as the 'Username' and paste the string of characters copied from Sendgrid under 'Password.'
  8. Optionally, you can choose to send emails as HTML (for a neater appearance) by checking 'Allow to send e-mails formatted as HTML.'
  9. To verify that everything is filled out correctly, you can send a test email immediately by entering your own email address under 'E-mail address to send a test email to.'
  10. Click 'Save configuration.'

If everything went well, you will now receive a test email, and from now on, all emails sent from the Drupal website will be delivered.

If you have any questions or comments about the above, please let me know by leaving a comment below.

The content of this field is kept private and will not be shown publicly.

Beperkte HTML

  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>
  • Lines and paragraphs break automatically.