WordPress Simple SMTP

Beskrivning

Lägger till enkla SMTP-inställningar till din WordPress-installation och låter dig definiera anpassade inställningar. Detta är särskilt användbart för webbhotell som inte erbjuder kontroll över php-funktionen mail.

Om loggning är aktiverat visas ett segment i inställningspanelen med en 30-dagars översikt över de senaste e-postmeddelandena. Äldre loggar rensas automatiskt bort. Se ”Vanliga frågor” om du vill ha en mer permanent lösning.

För mer information, se projektets wiki på GitHub.

Åsidosättande av miljö och konstanter (valfritt)

Detta tillägg föredrar miljövärden och värden lagrade i konstanter framför motsvarande inställningar sparade med tillägget, vilket gör det lättare att använda detta tillägg via distribution (deployment).

Dessa kan antingen lagras ditt systems env-inställning eller i wp-config.php som define( 'SE_NEDAN', 'ditt_värde_här' );.

Accepterade parametrar

  • SMTP_HOST (sträng) E-postserverns namn.
  • SMTP_PORT (heltal) Portadress (vanligtvis 25, 465 eller 587).
  • SMTP_AUTH (heltal, 1 eller 0) Skicka inloggningsuppgifterna nedan till din e-postserver.
  • SMTP_USER (sträng) Användarnamnet för detta e-postkonto.
  • SMTP_PASS (sträng) Lösenordet för e-postkontot.
  • SMTP_FROM (sträng) Tvinga alla meddelanden att skickas från denna e-postadress.
  • SMTP_FROMNAME (sträng) Tvinga alla meddelanden att ha ett visst avsändarnamn.
  • SMTP_SEC (sträng) Använd en viss säkerhetsmetod för e-post (accepterar ”def” (standard), ”ssl”, ”tls” och ”off”).
  • SMTP_NOVERIFYSSL (booleskt) Inaktivera validering av SMTP-servercertifikatet (rekommenderas inte).
  • SMTP_LOG (booleskt) Styr aktivering av och synlighet för logg.
  • SMTP_DISABLE (booleskt) Inaktiverar e-postfunktionen. De kommer fortfarande att loggas om loggen är aktiverad men de skickas inte ut.

It is recommended to store at least SMTP_PASS in your wp-config.php file (with the correct file permissions set). If the openssl extension is available, the plugin will attempt to encrypt the password in the database.

Vanliga frågor

Hur åtgärdar jag SMTP-fel?

Detta tillägg instruerar PHPMailer (det e-postbibliotek WordPress har valt) att använda SMTP-läge, och lägger till de inställningar du väljer. I 9 fall av 10 beror de felmeddelandena du ser på felaktig konfiguration. PHPMailer har en bra guide som hjälper dig att ta reda orsaken till dessa problem.

Felsökning – PHPMailer.

The one instance where an SMTP error can be caused by this plugin is if the SMTP password is stored in the database when the secret keys have been regenerated. You will need to re-save the password to refresh the encryption keys.

Du kan alltid få hjälp av ditt webbhotell och/eller din SMTP-tjänsteleverantör.

Kompatibilitet med tillägg

When using the logging functionality, the plugin will store the logged emails in the posts table, as an invisible post type. Normally this should work completely fine, but if you have a plugin that scans custom post types and sends an email about them, there’s a chance the third-party plugin might get stuck in a loop. For plugins like this, it is best to disable the functionality on the logging post type (sbss_email_log).

The following plugins have had reported issues:
* Sucuri Security.

En eller flera inställningar är markerade i grått som oåtkomliga

This plugin supports being overridden by DEFINE, so please check to see that you are not setting a define for a WP Simple SMTP option. These are most commonly stored in the wp-config.php file.

Hierarkin för åsidosättande är denna, med högst prioritet överst.

  • Miljö-variabel.
  • Konstant-variabel (definierad i wp-config.php).
  • Inställningar för multisitenätverk.
  • Lokalt konfigurerade inställningar.

Hur stoppar jag den automatiska tömningen av loggarna?

The logs by default will auto-prune to avoid keeping sensitive details in logs and contributing to database bloat. But if you wish to keep the logs more permanently, then register the following hook (typically in your theme functions.php) to disable the auto-pruning functionality:

add_filter( 'simple_smtp_disable_log_prune', '__return_true' );

Hur är SMTP-lösenordet lagrat?

If openssl is available to PHP, then the password will be encrypted (not hashed) when stored in the database. If unavailable, the SMTP password will be saved into the database as plaintext. The more recommended way of storing the password is to define SMTP_PASS in your wp-config.php file, which should already be locked and inaccessible from the front-end.

Note: Multisite over-ride password is currently not encrypted. Please see this issue.

Kan jag ändra antalet inlägg som visas i loggvyn?

This can be adjusted by the ’simple_smtp_log_table_max_per_page’ filter. Returning an integer value to this filter hook will adjust the table page limit.

Stödjer detta tillägg WordPress CLI?

Ja. Med WP-CLI kan du utföra följande åtgärder:

  • email-log Visa loggarna om aktiverat.
  • email-test Skicka ett testmeddelande.

För att se tillgängliga alternativ och hjälpdokumentation, kör kommandot wp help eller wp help <funktionsnamn>.

Fungerar detta tillägg på nätverksinstallationer av WordPress (multisite)?

Ja. Varje webbplats kan ha unika inställningar, om inte åsidosättning är aktiverad. Nätverket kommer använda huvudwebbplatsens inställningar, så e-postmeddelanden för nätverksadministration kommer visas i huvudwebbplatsens logg.

Since version 1.2, network-activating the plugin grants special configuration options for super administrators. This includes the ability to set overrides and configure site admin access.

Why do I see capital texts next to the input boxes? (Debugging disabled input boxes)

To help diagnose disabled input boxes, when the WordPress site is in debugging mode, the input fields will show a small debug text to indicate where the setting came from.

  • CONFIG is the standard method of saving settings via the admin menu.
  • CONST are overrides typically set in either wp-config.php or your theme’s functions.php.
  • MULTISITE are network-defined overrides set in the Network Mail panel.
  • ENV are pulled from the machine/server environmental settings.

Kan jag rapportera ett problem eller bidra till utvecklingen?

Ja! Se vårt GitHub-filförvar här för att rapportera problem och/eller göra ”pull requests”.

One of the easiest aspects to contribute to is the SMTP quick configuration segment. If you wish to maintain this aspect, suggest a new setting, or report broken entries, see the SMTP quick config wiki page.

Recensioner

27 juli 2023
Thank you for developing this module, it works great and currently it doesn't include many other things that could bloat the site.
15 juli 2023
Lots of bloated SMTP plugins happy to take your money. I appreciate the heck out of this free plugin. It's open source, works perfect, and does the job needed and only the job needed.
8 juni 2022
A simple (no thrills) SMTP plugin that works with environmental variables in the wp-config.php file. 1. Install and activate the plugin 2. Define the values in wp-config.php docker-compose users: Define the values in the docker-compose.yml file and then add the variable to the wp-config. For example: define( 'SMTP_PASS ', getenv_docker('SMTP_PASS', '') );
Läs alla 9 betyg

Bidragsgivare och utvecklare

”WordPress Simple SMTP” är programvara med öppen källkod. Följande personer har bidragit till detta tillägg.

Bidragande personer

”WordPress Simple SMTP” har översatts till 5 språk. Tack till översättarna för deras bidrag.

Översätt ”WordPress Simple SMTP” till ditt språk.

Intresserad av programutveckling?

Läs programkoden, kika på SVN-filförvaret eller prenumerera på utvecklarloggen via RSS.

Ändringslogg

1.3.3

  • Verifierat att fungera med WordPress 6.3.
  • Fix: $log_service deprecation notice (#146).
  • Added: None encryption setting (#148).

1.3.2.2

  • Verified working with WordPress 6.1 and 6.2.
  • Fix: PHP warning on the CLI interface (#140).

1.3.2.1

  • Rollback: #116 fix regressed due to relying on a function not found in the general scope.

1.3.2

  • Added: Mail view now displays from, cc, bcc & the headers stored when logging is enabled.
  • Fix: Infinite loop when a plugin hooks into the mail routine functions and sends an email (#116).

1.3.1.1

  • Verifierat att fungera med WordPress 6.0.

1.3.1

  • Added: Glance view on the dashboard to see mail usage (Thanks KebbetPR 101, PR 102).
  • Åtgärdat: tabellvyn visas korrekt på mobiler (Tack KebbetPR 93).
  • Åtgärdat: navigation för loggtabellvyn (Tack KebbetPR 106).

1.3

  • Added: Read logged emails via WP-CLI.
  • Added: Status message from testing emails (#81).
  • Change: Uninstalling the plugin will remove the lingering logs (#70).
  • Change: (For new installs) logs purge automatically after a month (#71).
  • Change: Quick config settings now contained within plugin (#78).
  • Change: Tightened permissions to the log viewer (#74).
  • Fix: Incorrect capability type used by the log viewer. Thanks to Benoît Chantre #74.

1.2.3

  • Add: WordPress CLI support. See the FAQ for usage details.
  • Change: Password not returned plaintext in settings (#61).
  • Fix: Multisite-only config caused an instantiation error (#67).

1.2.2

  • Add: Filter for the log entries. Thanks to Kebbet #57.
  • Change: Input boxes clearer and more WordPress-standardised (#51, #52).
  • Fix: Use network_admin_url instead of crafting a URL. Thanks to Kebbet #53.
  • Fix: Notice when saving settings without password being set (#44).

1.2.1

  • Change: Multisite listing table improvements. Thanks to Kebbet (#50).
  • Fix: Line break issue when viewing emails in the site log. Thanks to Kebbet #47.
  • Fix: Missed localisations in the multisite table. Thanks to Kebbet #45.

1.2

  • New: Multisite settings for admin visibility and override settings (#6).
  • New: Sites in debug mode will show what stage has set the configuration item in the relevant box.
  • New: For sites using logging, ’Erase Personal Data’ will remove requested email address entries from the log (#37).

1.1.2

  • Fungerar med WordPress 5.8.

1.1.1

  • Verifierat att fungera med WordPress 5.7.
  • Fix: Crash when sending emails with the email system disabled (#35).

1.1.0

  • New: You can now disable emails (#9).
  • New: Attachments are now logged, and will be resent if they are still available on the system (#14).
  • New: Key change detection when SMTP password encryption is used, to warn user the email dispatch may fail (#28).
  • Change: Custom HTML removed in favour of translatable HTML test email. Thanks to Kebbet for implementation (#26).
  • Fix: JavaScript error when viewing emails (#24).

1.0.2

  • Fix: Quick config translations not loading, and missing i18n entities. Thanks Kebbet (#21).
  • Fix: Incorrect pagination if the log count was divisible by 5. Thanks Kebbet (#18).

1.0.1

  • Fix: Text-domain mismatch causing translations not to load in correctly. Thank you to Kebbet for the fix (#19).

1.0.0

0.3.6

  • SMTPSecure is now a configurable option (#11).
  • Log entries can now be deleted (#13).

0.3.5

  • When openssl is available, the password stored in the database will be encrypted.
  • Added a quick configuration option, to guide SMTP setup (less Googling).

0.3.4

  • Confirmed working with WordPress 5.5.1.
  • Added option to disable SSL verification.
  • Multiple emails can be used in the test functionality.

0.3.3

  • Independent log tables deprecated for CPT.

0.3.2

  • Ändrat visningsformat för e-postloggen.
  • Limit resent emails to hourly.

0.3.1

  • Table is created or deleted upon plugin state change.

0.3

  • Ändringar av testmeddelanden.
  • Log view changed depending on header.

0.2

  • SMTP-felloggning.
  • Visa och skicka om e-postmeddelanden.
  • Testa för e-postinställningar.

0.1

  • SMTP configuration handling (overrides mail()).
  • Optional SMTP logging (basic functionality).