Extension:SendGrid
リリースの状態: 安定 |
|
|---|---|
| 実装 | 通知 |
| 説明 | Enables MediaWiki to use the SendGrid API for email distribution. |
| 作者 | Derick Alangi (X-Savitarトーク) |
| 最新バージョン | 4.0 |
| 互換性の方針 | MediaWiki とともにリリースされるスナップショット。 master には後方互換性がありません。 |
| MediaWiki | 1.40+ |
| PHP | 7.4+ |
| Composer | sendgrid/sendgrid |
|
|
| ライセンス | GNU 一般公衆利用許諾書 2.0 以降 |
| ダウンロード | README |
| translatewiki.net で翻訳を利用できる場合は、SendGrid 拡張機能の翻訳にご協力ください | |
| 問題点 | 未解決のタスク · バグを報告 |
The SendGrid extension enables MediaWiki to send emails through SendGrid's API service.
インストール
- ダウンロードして、ファイルを
extensions/フォルダー内のSendGridという名前のディレクトリ内に配置します。
開発者とコード寄稿者は、上記の代わりに以下を使用してGitからインストールします:cd extensions/ git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/SendGrid
- 以下のコードを LocalSettings.php ファイルの末尾に追加します:
wfLoadExtension( 'SendGrid' );
完了 – ウィキの「Special:Version」に移動して、拡張機能が正しくインストールされたことを確認します。
Vagrantでのインストール:
- Vagrantを使用している場合は、
vagrant roles enable sendgrid --provisionでインストールしてください。
composer update in extensions/SendGrid/ folder so that composer can pick up and install the required SendGrid dependencies for the extension to run smoothly.
設定
You need to have an account on www.sendgrid.com and a valid API key to successfully send emails via SendGrid using this extension.
Instructions to generate an API key can be found in the SendGrid API key documentation.
SendGrid/extension.json as this will be a vulnerability allowing someone else to be able to use your account/key to send emails or perform other bad stuff.In your SendGrid account settings, generate an API key. With a valid API Key, configure your API key in LocalSettings.php:
$wgSendGridAPIKey = "YOUR_API_KEY_HERE";
If you're using this extension with SMTP, make sure to configure your SMTP as follows:
$wgSMTP = [
'host'=> "smtp.yoursmtp.org",
'IDHost' => "yourhost.org",
'port' => 587,
'auth' => true,
'username' => "yourSMTPusername",
'password' => "yourSMTPpassword"
];
Test your settings
Go to Special:EmailUser and send an email to your own address to verify that the extension is working. You'll receive an email from the address you input and check to see if it's sent via the SendGrid API, for example, Your Name example@domain.com via sendgrid.net .
Errors or exceptions
If your email fails to send and throws an exception, make sure that $wgPasswordSender matches the email sender identifier used in your SendGrid account.
Notice the change here: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/SendGrid/+/833121
