Drupal 9 Webform 發送自定義Email 功能的本地開發環境配置
Drupal 9 Webform 表單提交後可以自定義 email 內容發送通知郵件到指定email地址,本地開發中使用 Mailhog 做測試。
💡關於Mailhog的安裝介紹參看Y Cheung之前的文章《本地開發測試郵件服務 Mailhog
[https://szeching.com/mailhog-for-web-and-api-based-smtp-testing/]》需求分析
根據需求,確定要做的任務有2個:
1. 用戶提交表單後發送通知 email 至指定地址
2. 獲取用戶填寫的表單內容製作指定內容格式的郵件
環境設定
* Drupal v9.3.3
* Mailhog
* drupal/