- 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.
推薦閱讀
- 出口跨境電商:速賣通SEO精準引流與數(shù)據(jù)化運營
- 大數(shù)據(jù)環(huán)境下跨境電商發(fā)展前景研究
- 淘寶、天貓、微店實戰(zhàn)一本通:開店、裝修與推廣
- Magento 2 Development Quick Start Guide
- 網(wǎng)絡客戶服務與管理
- 微博營銷:微時代營銷大革命
- 一本書玩轉(zhuǎn)電商、微商軟文營銷
- 微博營銷與運營(第2版 慕課版)
- 趨勢:首屆世界互聯(lián)網(wǎng)大會全紀錄
- 淘寶網(wǎng)開店、推廣與交易
- 網(wǎng)店客服(微課版)
- 農(nóng)產(chǎn)品電子商務與網(wǎng)絡營銷
- 直播電商實戰(zhàn)一本通
- O2O實踐:互聯(lián)網(wǎng)+戰(zhàn)略落地的O2O方法
- 馬說·馬千里微信課堂(第一輯)