Score:0

How can I send an email for confirmations via a webform?

in flag

I'm fairly new to Drupal development but have been learning quickly. I've been trying to setup my Drupal site to send emails for form submissions confirmations through Webform (I just need us to be notified when the contact form has been submitted), yet struggling to get this functionality to work. The site is unable to send any emails for any user confirmation or reset passwords as well. I've been trying the Swift Mailer module to get these emails to send.

I've been trying to send through Sendmail and Spool, yet encountering the following error when I try send a test.

Error: Class 'Html2Text\Html2Text' not found in Drupal\swiftmailer\Plugin\Mail\SwiftMailer->massageMessageBody() (line 595 of /bitnami/drupal/modules/swiftmailer/src/Plugin/Mail/SwiftMailer.php).

I've tried through Mimemail as well and getting the following error in the log messages.

Error sending email (from to [my address] with reply-to not set).

Does anyone know of any fix for these errors, or a better way to send emails through Drupal? I know SMTP is an option, but I struggled to configure this as well.

leymannx avatar
ne flag
So, you've basically gone through https://www.ostraining.com/blog/drupal/html-emails-from-drupal-webform/? `The site is unable to send any emails for any user confirmation or reset passwords as well` sounds more like a general problem and not connected to Webform. Have you set a site email address at all under /admin/config/system/site-information?
apaderno avatar
us flag
Welcome to Drupal Answers! The [html2text/html2text](https://packagist.org/packages/html2text/html2text) package isn't a Drupal requirement. You need to install it to avoid the first error message. As for the second error message, I don't see any *from* address, which could be the reason why the emails aren't sent, or don't reach destination.
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.