- Drupal 9 Module Development
- Daniel Sipos Antonio De Marco
- 226字
- 2021-06-11 18:36:03
Chapter 3: Logging and Mailing
In the previous chapter, we learned about some of the more common things most Drupal module developers will have to know, starting with the basics, that is, creating a Drupal module.
In this chapter, we will take things further and cover some other important tasks a developer will have to perform:
- We will take a look at how logging works in Drupal 9. In doing so, we will cover some examples by expanding on our Hello World module.
- We will look at the Mail API in Drupal, namely, how we can send emails with the default setup (PHP mail). However, more than that, I will show you how to create your own email system to integrate with your (perhaps external) mail service; remember plugins? This will be yet another good example of using a plugin to extend existing capabilities.
- At the end of the chapter, we will also look at the Drupal token system. We'll do so in the context of us replacing certain tokens with contextual data so that the emails we send out are a bit more dynamic.
By the end of this chapter, you should be able to add logging to your Drupal module and feel comfortable sending emails programmatically. Additionally, you'll understand how tokens work, and as a bonus, see how you can define your own tokens.
推薦閱讀
- 直播人才:數(shù)字電商的組織密碼
- 移動(dòng)社群營銷實(shí)戰(zhàn)法則、技巧與經(jīng)典案例
- 電子商務(wù)視覺設(shè)計(jì)(視頻指導(dǎo)版)
- 網(wǎng)紅經(jīng)濟(jì)3.0:自媒體時(shí)代的掘金機(jī)會(huì)
- 轉(zhuǎn)化率:電商運(yùn)營核心思維與實(shí)操案例
- 玩賺你的網(wǎng)站:網(wǎng)站運(yùn)營從業(yè)人員必備手冊
- 淘寶網(wǎng)店鋪裝修寶典
- 跨境電子商務(wù)多平臺(tái)操作實(shí)務(wù)
- PrestaShop Module Development
- 電子商務(wù)理論與實(shí)務(wù)(第2版)
- 移動(dòng)電商:營銷方向
- 淘寶網(wǎng)開店 進(jìn)貨 運(yùn)營 管理 客服 實(shí)戰(zhàn)200招
- 一本書玩轉(zhuǎn)互聯(lián)網(wǎng)品牌營銷
- 教訓(xùn):互聯(lián)網(wǎng)創(chuàng)業(yè)必須避免的八大誤區(qū)
- 直播電商平臺(tái)運(yùn)營(微課版·第2版)