ຂ້າມໄປທີ່ເນື້ອຫາ
WordPress.org

ລາວ

  • ທິມ
  • ປັກອິນ
  • ຂ່າວ
  • ກ່ຽວກັບ
  • ທິມລາວ
  • ຕິດຕໍ່
  • ດາວໂຫລດ WordPress
ດາວໂຫລດ WordPress
WordPress.org

Plugin Directory

HTML Emails

  • ສົ່ງປລັກອິນ
  • ທີ່ມັກຂອງຂ້ອຍ
  • ເຂົ້າສູ່ລະບົບ
  • ສົ່ງປລັກອິນ
  • ທີ່ມັກຂອງຂ້ອຍ
  • ເຂົ້າສູ່ລະບົບ

ປລັກອິນນີ້ ຍັງບໍ່ທັນໄດ້ຮັບການທົດສອບກັບ WordPress 3 ເວີຊັນຫຼັກຫຼ້າສຸດ. ມັນອາດຈະບໍ່ໄດ້ຮັບການເບິ່ງແຍງ ຫຼື ສະໜັບສະໜູນອີກຕໍ່ໄປ ແລະ ອາດມີບັນຫາການເຮັດວຽກຮ່ວມກັນເມື່ອໃຊ້ກັບ WordPress ເວີຊັນທີ່ໃໝ່ກວ່າ.

HTML Emails

ໂດຍ Mohammad Jangda
ດາວໂຫຼດ
  • ລາຍລອຽດ
  • ການຣີວິວ
  • ການຕິດຕັ້ງ
  • ການພັດທະນາ
ການຊ່ວຍເຫຼືອ

ຄຳອະທິບາຍ

Converts the default plain-text email notifications into fully customizable, sweet-lookin’ HTML emails.

Multi-site support (for WordPress 3.0) will be added soon.

Notes:

  • Emails are sent with readable plain-text versions for email clients that don’t support HTML emails. Note: they’re somewhat crude because they’re auto-generated. I may decide to add decent-looking plain-text versions in the future, but that’s low priority.
  • Emails have only been tested on Gmail, Gmail on Android, and Outlook, but should work on most email clients (including clients without HTML support). If you’re using a client other than the 3 I’ve listed, I would appreciate an email with info on whether the email looks like it should and works correctly.

Send your questions, comments, suggestions via email.

Customizing Templates

You can fully customize the look of any of the emails by creating your own templates. Emails have two pieces:

  • Email Wrapper (content common across all emails)
  • Email Message (content unique to each email)

Custom templates can be created an placed in either your theme directory or your Content directory (/wp-content/ on most sites). See utils.php for a number of useful functions that you can use in your templates.

Email Wrapper

The Email Wrapper includes elements and markup that are common across all email notifications. It contains your html, head and body tags and any other elements that are shared across emails.

To customize the email template, create a file called html_email.php and add it to either your theme or content directory.

Note: you must include the following code in the template to work:

<?php htmlize_message_body($email_templates, $email_data); ?>

The Email Wrapper has access to the following variables:

  • $email_title: (string) title of the email
  • $email_subtitle: (string) subtitle of the email
  • $email_data: (array) Associative array of various data passed by the calling function

Email Message: New Comment

By default, new comment and comment moderation emails share the same template. You can create separate templates for both for each comment type by creating the following files:

  • notify_postauthor_comment.php
  • notify_postauthor_trackback.php
  • notify_postauthor_pingback.php
  • notify_moderator_comment.php
  • notify_moderator_trackback.php
  • notify_moderator_pingback.php

If you don’t want to customize the emails by comment type, just create the following two templates:

  • notify_postauthor.php
  • notify_moderator.php

If you just want a custom template shared between the two notification types, just create the following:

  • notify_comment.php

New Comment email messages have the following data variables available:

  • $comment – (obj) comment object
  • $post – (obj) post object
  • $comment_type – (string) slug for the comment_type
  • $comment_type_text – (string) friendly name for the comment_type
  • $comment_moderate – (bool) Whether the comment needs moderation or not

Using HTML Emails in your plugin

It’s pretty easy to use. The main call you need to make is htmlize_message() and pass the return into your wp_mail object. Details to come.

Credits

  • Blockquote image borrowed from the amazing Wu Wei theme by Jeff Ngan
  • Plain Text conversion script by Jon Abernathy aka Chuggnutt
  • Email styling inspired by WordPress.com Blog Subscription Notifications

ພາບໜ້າຈໍ

  • New Comment email as viewed in Gmail
  • New User email as viewed in Gmail
  • Email as viewed in Mail.app

ການຕິດຕັ້ງ

  1. Upload and extract the plugin to plugins directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. Enjoy sweet lookin’ email notifications!

ຄຳຖາມທີ່ພົບເລື້ອຍ

When I get some Frequently Asked Questions, I’ll include them here.

ການຣີວິວ

ບໍ່ມີການຣີວິວສຳລັບປລັກອິນນີ້.

ຜູ້ຮ່ວມພັດທະນາ ແລະ ຜູ້ພັດທະນາ

“HTML Emails” ແມ່ນຊອຟແວໂອເພັນຊອດ (Open Source). ບຸກຄົນຕໍ່ໄປນີ້ໄດ້ມີສ່ວນຮ່ວມໃນການພັດທະນາປລັກອິນນີ້.

ຜູ້ຮ່ວມພັດທະນາ
  • Mohammad Jangda

ແປ “HTML Emails” ເປັນພາສາຂອງເຈົ້າ.

ສົນໃຈຮ່ວມພັດທະນາບໍ່?

ເບິ່ງລະຫັດ, ກວດເບິ່ງ ຄັງເກັບ SVN, ຫຼື ຕິດຕາມ ບັນທຶກການພັດທະນາ ຜ່ານ RSS.

ບັນທຶກການປ່ຽນແປງ

1.0 (2010-05-05)

  • Note: This version was originally released as v0.2 but users weren’t being prompted with an upgrade because parsefloat is dumb.
  • Feature: Support for “New User” and “Password Lost” emails
  • Bug: Moderation emai not showing the correct number of emails pending
  • Localization: Belarusian translation added. Thanks to Marcis G.

0.2 (2010-05-04)

  • Same as 1.0

0.11 (2010-04-09)

  • Better localization support
  • Bug: Moderation emails were not being sent because the wp_mail call was commented out
  • Docs: Localization comments and addtional details on customizing templates

0.1 (2010-04-04)

  • First release
  • Comment notification emails

ຂໍ້ມູນກຳກັບ (Meta)

  • ເວີຊັນ 1.0
  • ອັບເດດຫຼ້າສຸດເມື່ອ 16 ປີ ທີ່ຜ່ານມາ ທີ່ຜ່ານມາ
  • ການຕິດຕັ້ງທີ່ໃຊ້ງານຢູ່ 20+
  • ເວີຊັນ WordPress 2.9 ຫຼື ສູງກວ່າ
  • ທົດສອບເຖິງເວີຊັນ 3.0.5
  • ພາສາ
    English (US)
  • ແທັກ
    emailhtmlhtml emailhtml emailsnotification
  • ມຸມມອງຂັ້ນສູງ

ການໃຫ້ຄະແນນ

1 ຈາກທັງໝົດ 5 ດາວ.
  • ການວິຈານ 5 ດາວ ຈຳນວນ 0 ລາຍການ 5 ດາວ 0
  • ການວິຈານ 4 ດາວ ຈຳນວນ 0 ລາຍການ 4 ດາວ 0
  • ການວິຈານ 3 ດາວ ຈຳນວນ 0 ລາຍການ 3 ດາວ 0
  • ການວິຈານ 2 ດາວ ຈຳນວນ 0 ລາຍການ 2 ດາວ 0
  • ການວິຈານ 1 ດາວ ຈຳນວນ 1 ລາຍການ 1 ດາວ 1

ເພີ່ມຄຳຄິດເຫັນຂອງຂ້ອຍ

ເບິ່ງ ຄຳຄິດເຫັນ ທັງໝົດ

ຜູ້ຮ່ວມພັດທະນາ

  • Mohammad Jangda

ການຊ່ວຍເຫຼືອ

ມີຄຳຖາມ ຫຼື ຕ້ອງການຄວາມຊ່ວຍເຫຼືອບໍ່?

ເບິ່ງຟໍຣັມການຊ່ວຍເຫຼືອ

ບໍລິຈາກ

ເຈົ້າຕ້ອງການສະໜັບສະໜູນການພັດທະນາຂອງປລັກອິນນີ້ບໍ່?

ບໍລິຈາກໃຫ້ປລັກອິນນີ້

  • ກ່ຽວກັບ
  • ຂ່າວສານ
  • ໂຮສຕິງ
  • ຄວາມເປັນສ່ວນຕົວ
  • ງານທີ່ໂດດເດັ່ນ
  • ທີມ
  • ປລັກອິນ
  • ຮູບແບບບລັອກ
  • ຮຽນຮູ້
  • ຊ່ວຍເຫຼືອ
  • ນັກພັດທະນາ
  • WordPress.tv ↗
  • ມີສ່ວນຮ່ວມ
  • ກິດຈະກຳ
  • ບໍລິຈາກ ↗
  • Five for the Future
  • WordPress.com ↗
  • Matt ↗
  • bbPress ↗
  • BuddyPress ↗
WordPress.org
WordPress.org

ລາວ

  • ຢ້ຽມຊົມບັນຊີ X (ຊື່ເກົ່າ Twitter) ຂອງພວກເຮົາ
  • ຢ້ຽມຊົມບັນຊີ Bluesky ຂອງພວກເຮົາ
  • ຢ້ຽມຊົມບັນຊີ Mastodon ຂອງພວກເຮົາ
  • ຢ້ຽມຊົມບັນຊີ Threads ຂອງພວກເຮົາ
  • ຢ້ຽມຊົມໜ້າ Facebook ຂອງພວກເຮົາ
  • ຢ້ຽມຊົມບັນຊີ Instagram ຂອງພວກເຮົາ
  • ຢ້ຽມຊົມບັນຊີ LinkedIn ຂອງພວກເຮົາ
  • ຢ້ຽມຊົມບັນຊີ TikTok ຂອງພວກເຮົາ
  • ຢ້ຽມຊົມຊ່ອງ YouTube ຂອງພວກເຮົາ
  • ຢ້ຽມຊົມບັນຊີ Tumblr ຂອງພວກເຮົາ
Code is Poetry.
The WordPress® trademark is the intellectual property of the WordPress Foundation.