- 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.
推薦閱讀
- 網(wǎng)絡(luò)創(chuàng)業(yè)
- 跨境電商實(shí)務(wù)
- 視覺營銷:從入門到精通(微課版)
- Excel電商數(shù)據(jù)分析與應(yīng)用(第2版·微課版)
- 傳統(tǒng)企業(yè)電商之道
- 旅游電子商務(wù)理論及應(yīng)用
- 電子商務(wù)多平臺運(yùn)營與實(shí)踐
- 淘寶網(wǎng)店深度SEO優(yōu)化技術(shù)揭秘:網(wǎng)店流量高效轉(zhuǎn)化
- 視覺營銷與運(yùn)營實(shí)戰(zhàn)從入門到精通
- 抖音上的財(cái)富:帶貨盈利月入5萬秘技大公開
- 電子商務(wù)安全與支付
- 贏在云端:云計(jì)算與未來商機(jī)
- 教訓(xùn):互聯(lián)網(wǎng)創(chuàng)業(yè)必須避免的八大誤區(qū)
- 小紅書達(dá)人實(shí)操攻略:內(nèi)容策劃 視頻制作 直播帶貨 運(yùn)營變現(xiàn)
- 網(wǎng)絡(luò)營銷實(shí)戰(zhàn)密碼