Skip to content
This repository has been archived by the owner on Sep 3, 2021. It is now read-only.

Commit

Permalink
Release v1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ShadowySpirits committed Feb 18, 2019
0 parents commit aedadc1
Show file tree
Hide file tree
Showing 9 changed files with 6,347 additions and 0 deletions.
391 changes: 391 additions & 0 deletions Plugin.php

Large diffs are not rendered by default.

51 changes: 51 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
## 插件简介

Comment2Mail 是 Typecho 评论邮件通知插件,支持 SMTP、Mailgun 两种接口

在评论审核通过、用户评论文章、用户评论被回复时发送邮件通知

![截图](./mail_screenshot.png)

## 安装方法

1.[releases](https://github.com/ShadowySpirits/Comment2Mail/releases) 中下载最新版本插件,上传至网站的 /usr/plugins/ 目录下
2. 启用该插件,正确填写相关信息

## 自定义模板说明

插件共有三个模板,保存在 `theme` 目录下,分别为:

1. approved.html:邮件审核通过通知模板
2. author.html:文章评论通知模板
3. reply.html:评论回复通知模板

三个模板使用变量作为内容替换,您只需在自己的模板中增加相应的模板变量即可,模板变量列表如下:

### approved.html

1. {blogUrl}:博客地址
2. {blogName}:博客名称
3. {author}:评论者名称
4. {permalink}:文章链接
5. {title}:文章标题
6. {text}:评论内容

### author.html

1. {blogUrl}:博客地址
2. {blogName}:博客名称
3. {author}:评论者名称
4. {permalink}:文章链接
5. {title}:文章标题
6. {text}:评论内容

### reply.html

1. {blogUrl}:博客地址
2. {blogName}:博客名称
3. {author}:被回复者名称
4. {permalink}:文章链接
5. {title}:文章标题
6. {text}:被回复者评论内容
7. {replyAuthor}:回复者名称
8. {replyText}:回复内容
39 changes: 39 additions & 0 deletions lib/Exception.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?php
/**
* PHPMailer Exception class.
* PHP Version 5.5.
*
* @see https://github.com/PHPMailer/PHPMailer/ The PHPMailer GitHub project
*
* @author Marcus Bointon (Synchro/coolbru) <[email protected]>
* @author Jim Jagielski (jimjag) <[email protected]>
* @author Andy Prevost (codeworxtech) <[email protected]>
* @author Brent R. Matzelle (original founder)
* @copyright 2012 - 2017 Marcus Bointon
* @copyright 2010 - 2012 Jim Jagielski
* @copyright 2004 - 2009 Andy Prevost
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
* @note This program is distributed in the hope that it will be useful - WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE.
*/

namespace PHPMailer\PHPMailer;

/**
* PHPMailer exception handler.
*
* @author Marcus Bointon <[email protected]>
*/
class Exception extends \Exception
{
/**
* Prettify error message output.
*
* @return string
*/
public function errorMessage()
{
return '<strong>' . htmlspecialchars($this->getMessage()) . "</strong><br />\n";
}
}
Loading

0 comments on commit aedadc1

Please sign in to comment.