Extension:SendGrid/sv
Utgivningsstatus: stabil |
|
|---|---|
| Genomförande | Underrätta |
| Beskrivning | Tillåter MediaWiki att använda SendGrid API:n för e-post distribuering. |
| Författare | Derick Alangi (X-Savitardiskussion) |
| Senaste versionen | 4.0 |
| Kompatibilitetsregler | Snapshots releases along with MediaWiki. Master is not backward compatible. |
| MediaWiki | 1.40+ |
| PHP | 7.4+ |
| Composer | sendgrid/sendgrid |
|
|
| Licence | GNU General Public License 2.0 eller senare |
| Ladda ner | README |
| Översätt tillägget SendGrid om det finns tillgängligt på translatewiki.net | |
| Ärenden | Öppna ärenden · Rapportera en bugg |
The SendGrid extension enables MediaWiki to send emails through SendGrid's API service.
Installation
- Ladda ner och placera filen/filerna i en katalog som heter
SendGridi dinextensions/-mapp.
Utvecklare och personer som bidrar med kod borde istället installera tillägget från Git, med:cd extensions/ git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/SendGrid
- Lägg till följande kod längst ner i din LocalSettings.php-fil:
wfLoadExtension( 'SendGrid' );
Klart – Ta dig till Special:Version på din wiki för att bekräfta att tillägget har installerats ordentligt.
Vagrant-installering:
- Om du använder Vagrant ska du installera med
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.Configuration
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
