{"id":165440,"date":"2022-11-20T09:52:04","date_gmt":"2022-11-20T09:52:04","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/smtp-for-contact-from-7\/"},"modified":"2026-03-24T09:07:51","modified_gmt":"2026-03-24T09:07:51","slug":"cf7-smtp","status":"publish","type":"plugin","link":"https:\/\/da.wordpress.org\/plugins\/cf7-smtp\/","author":15006385,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.1.0","stable_tag":"1.1.0","tested":"6.9.4","requires":"5.5","requires_php":"7.1","requires_plugins":null,"header_name":"SMTP for Contact Form 7","header_author":"codekraft","header_description":"A trustworthy SMTP plugin for Contact Form 7. Simple and useful.","assets_banners_color":"d6cdae","last_updated":"2026-03-24 09:07:51","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/wordpress.org\/plugins\/cf7-smtp","header_author_uri":"https:\/\/modul-r.codekraft.it\/","rating":4,"author_block_rating":0,"active_installs":1000,"downloads":7061,"num_ratings":2,"support_threads":2,"support_threads_resolved":1,"author_block_count":1,"sections":["description","installation","changelog"],"tags":{"0.0.1":{"tag":"0.0.1","author":"codekraft","date":"2025-12-10 23:09:10"},"1.0.0":{"tag":"1.0.0","author":"codekraft","date":"2025-12-10 23:09:10"},"1.1.0":{"tag":"1.1.0","author":"codekraft","date":"2026-03-24 09:07:51"}},"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":1,"4":0,"5":1},"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":2821098,"resolution":"128x128","location":"assets","locale":""},"icon-256x256.png":{"filename":"icon-256x256.png","revision":2821098,"resolution":"256x256","location":"assets","locale":""},"icon.svg":{"filename":"icon.svg","revision":2821098,"resolution":false,"location":"assets","locale":false}},"assets_banners":{"banner-1544x500.jpg":{"filename":"banner-1544x500.jpg","revision":2821098,"resolution":"1544x500","location":"assets","locale":""},"banner-722x250.jpg":{"filename":"banner-722x250.jpg","revision":2821098,"resolution":"722x250","location":"assets","locale":""}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["0.0.1","1.0.0","1.1.0"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":2821157,"resolution":"1","location":"assets","locale":""}},"screenshots":{"1":"Plugin options (1\/1)","2":"<a href=\"https:\/\/github.com\/WPBP\/WordPress-Plugin-Boilerplate-Powered\">Wordpress Plugin boilerplate<\/a>","3":"Contact Form 7 \u00a9 2021 Takayuki Miyoshi,<a href=\"https:\/\/it.wordpress.org\/plugins\/contact-form-7\/\">LGPLv3 or later<\/a>","4":"chart.js https:\/\/www.chartjs.org\/, \u00a9 2021 Chart.js <a href=\"https:\/\/github.com\/chartjs\/Chart.js\/graphs\/contributors\">contributors<\/a>, <a href=\"https:\/\/github.com\/chartjs\/Chart.js\/blob\/master\/LICENSE.md\">MIT<\/a>","5":"Banner image - Ejiri in Suruga Province (Sunsh\u016b Ejiri), from the series Thirty-six Views of Mount Fuji (Fugaku sanj\u016brokkei) Artist: Katsushika Hokusai (Japanese, Tokyo (Edo) 1760\u20131849 Tokyo (Edo))"},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[1152,450,12644,6696,41812],"plugin_category":[41],"plugin_contributors":[133085,223637],"plugin_business_model":[],"class_list":["post-165440","plugin","type-plugin","status-publish","hentry","plugin_tags-contact-form-7","plugin_tags-mail","plugin_tags-oauth2","plugin_tags-smtp","plugin_tags-wp-mail","plugin_category-communication","plugin_contributors-codekraft","plugin_contributors-gardenboi","plugin_committers-codekraft"],"banners":[],"icons":{"svg":"https:\/\/ps.w.org\/cf7-smtp\/assets\/icon.svg?rev=2821098","icon":"https:\/\/ps.w.org\/cf7-smtp\/assets\/icon.svg?rev=2821098","icon_2x":false,"generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/cf7-smtp\/assets\/screenshot-1.png?rev=2821157","caption":"Plugin options (1\/1)"}],"raw_content":"<!--section=description-->\n<p>WordPress uses PHPMailer to send mail from with your local mail server, but it can happen that your mail were not accepted by mail providers...\nThis can happen for several reasons, sometimes because the mail server is not configured or sometimes because the records DKIM, DMARC and SPF of the domain been set up correctly and so on...\nAnyway you can avoid any problems by using an external SMTP server and sending mail with it!<\/p>\n\n<h4>Additional features<\/h4>\n\n<p>\u2705 <strong>OAuth2 Authentication:<\/strong> Securely connect to Gmail and Microsoft Office 365 without needing to store passwords in your database or enable \"less secure apps\".\n\u2705 <strong>Per-Form Custom Templates:<\/strong> Wrap CF7 emails with beautiful templates. You can now select a specific custom template for <em>each<\/em> form directly from the plugin settings!\n\u2705 <strong>Global or CF7-Only Mode:<\/strong> Choose whether to override all WordPress emails with this SMTP configuration or limit it exclusively to Contact Form 7 submissions.\n\u2705 <strong>Live testing:<\/strong> a module for testing e-mail settings with the Rest-Api (that avoid to reload the page for this kind of test). The entire output of the php mailer will be captured, which will be useful in case of configuration errors or to get the wrong parameter when is possible.\n\u2705 <strong>Automated Reports:<\/strong> choose when and what email you want to receive the report and I will send you a beautifully formatted HTML summary of sent and failed emails. Includes log retention settings to keep your database clean.\n\u2705 <strong>Advanced Headers &amp; Security:<\/strong> Easily automatically set \"Reply-To\" headers, allow insecure options for self-signed certificates, and define custom \"From Name\" and \"From Email\" settings.<\/p>\n\n<p>This plugin is ads free and I don't want to try to sell you any pro version!\nIf you want to contribute, there are many ways to do so, from simple suggestions and bug reports to translating and contributing code.\nSee below how to do it!<\/p>\n\n<h3>SMTP<\/h3>\n\n<p>SMTP stands for 'Simple Mail Transfer Protocol'.\nIt is a connection-oriented, text-based network protocol of the Internet protocol family and as such is on the seventh layer of the ISO\/OSI model, the application layer.\nLike any other network protocol, it contains the rules for proper communication between networked computers.\nSMTP is specifically responsible for sending and forwarding e-mails from a sender to a recipient.\nSince its release in 1982 as the successor to the 'Mail Box Protocol' in Arpanet, SMTP has become the standard protocol for sending e-mails.\nHowever, the SMTP procedure remains largely invisible to the normal consumer, as it is executed in the background by the e-mail programme used.\nOnly if the software, the webmail application on the browser or the mobile e-mail application does not automatically determine the SMTP protocol when creating an account, does it have to be set manually to ensure smooth e-mail traffic.<\/p>\n\n<h4>SMTP presets<\/h4>\n\n<ol>\n<li>Aruba<\/li>\n<li>Gmail (tls and ssl)<\/li>\n<li>Yahoo (tls and ssl)<\/li>\n<li>Outlook (tls and ssl)<\/li>\n<li>Office365 (tls)<\/li>\n<\/ol>\n\n<h4>OAuth2 Setup<\/h4>\n\n<p><strong>Google Gmail<\/strong>\nTo use Gmail with OAuth2, you need to create a Google Cloud Project:\n1. Go to <strong>Google Cloud Console<\/strong> (console.cloud.google.com).\n2. Create a new project.\n3. Go to <strong>APIs &amp; Services &gt; Credentials<\/strong> and click <strong>Create Credentials &gt; OAuth client ID<\/strong>.\n4. Application type: <strong>Web application<\/strong>.\n5. <strong>Authorized redirect URIs<\/strong>: Copy the URL from the plugin settings (e.g., <code>https:\/\/your-site.com\/wp-admin\/admin.php?page=cf7-smtp&amp;oauth2_callback=1<\/code>).\n6. Copy the <strong>Client ID<\/strong> and <strong>Client Secret<\/strong> into the plugin settings.\n7. Important: Go to <strong>OAuth consent screen &gt; Test users<\/strong> and add your email address if the app is in \"Testing\" mode.\n8. Click <strong>Connect with OAuth2<\/strong> in the plugin settings.<\/p>\n\n<p><strong>Microsoft Office 365<\/strong>\n1. Go to the <strong>Azure Portal<\/strong> (portal.azure.com).\n2. Navigate to <strong>Azure Active Directory &gt; App registrations &gt; New registration<\/strong>.\n3. Enter an application name and set the <strong>Redirect URI<\/strong> (Web) to the exact URL provided in the plugin settings.\n4. Go to <strong>Certificates &amp; secrets<\/strong> and create a new client secret. Copy the secret's Value.\n5. Go to <strong>API permissions &gt; Add a permission &gt; Microsoft Graph &gt; Delegated permissions<\/strong> and add <code>SMTP.Send<\/code> and <code>offline_access<\/code>.\n6. Copy the <strong>Application (client) ID<\/strong> and the <strong>Client Secret<\/strong> into the plugin settings.\n7. Click <strong>Connect with OAuth2<\/strong>.<\/p>\n\n<p>Would you like to find more presets (that you think are useful to other users)?\nOpen a request in the support form and provide the necessary connection data (auth, server address and port).\nIn the next cf7-smtp version you will find the required configuration among the presets.<\/p>\n\n<h4>Security<\/h4>\n\n<p>It's warmly advised to use OAuth2 for supported providers (Gmail, Office365) so no passwords are saved. If using basic SMTP authentication, it is highly recommended to store at least the password into wp-config.php as a constant.\nAnd in addition, it's also very easy! It needs only to add<\/p>\n\n<pre><code>define( 'CF7_SMTP_USER_PASS', 'mySecr3tp4ssWord' );\n<\/code><\/pre>\n\n<p>into your <code>wp-config.php<\/code> just before<\/p>\n\n<pre><code>\/* That's all, stop editing! Happy publishing. *\/\n<\/code><\/pre>\n\n<p>All passwords will be stored encrypted, but still it is not good practice to put it into database!<\/p>\n\n<h4>Quick setup<\/h4>\n\n<p>as with the user password other constants can also be defined.\nAvailable constant are CF7_SMTP_HOST, CF7_SMTP_PORT, CF7_SMTP_AUTH, CF7_SMTP_USER_NAME, CF7_SMTP_USER_PASS, CF7_SMTP_FROM_MAIL, CF7_SMTP_FROM_NAME<\/p>\n\n<p>But, to quickly set up the plugin there is one constant that wraps all the others, so in case you manage multiple websites this will be very convenient!<\/p>\n\n<pre><code>define(\n    'CF7_SMTP_SETTINGS',\n    array(\n      'host'      =&gt; string,\n      'port'      =&gt; number,\n      'auth'      =&gt; ''|'tls'|'ssl',\n      'user_name' =&gt; string,\n      'user_pass' =&gt; string,\n      'replyTo'   =&gt; true|false,\n      'insecure'  =&gt; true|false,\n      'from_mail' =&gt; email,\n      'from_name' =&gt; string,\n      'smtp_mode' =&gt; 'cf7'|'override',\n  ));\n<\/code><\/pre>\n\n<h4>Template<\/h4>\n\n<p>Wouldn't it be better to have a small container to make our mail a little prettier?\nWell we have it! You can now assign specific templates to each of your forms via the plugin settings dashboard.\nTo use your own custom templates for emails, simply create them by following these steps:\n1. Create a folder named <code>cf7-smtp\/<\/code> or <code>templates\/cf7-smtp\/<\/code> in your theme (or child theme) folder.\n2. Create a <code>.php<\/code> or <code>.html<\/code> template file inside it.\n3. Go to the plugin settings under <strong>Style &gt; Form Email Templates<\/strong>, and select your newly found custom template from the dropdown menu for the desired form.\n4. (Optional) You can customize the logo, website link, and other template parts. Checkout the filter documentation on GitHub\/wiki.<\/p>\n\n<h3>Support<\/h3>\n\n<p>Community support: via the <a href=\"https:\/\/wordpress.org\/support\/plugin\/cf7-smtp\/\">support forums<\/a> on wordpress.org\nBug reporting (preferred): file an issue on <a href=\"https:\/\/github.com\/erikyo\/cf7-smtp\">GitHub<\/a><\/p>\n\n<h4>Contribute<\/h4>\n\n<p>We love your input!\nWe want to make contributing to this project as easy and transparent as possible, whether it's:<\/p>\n\n<ul>\n<li>Reporting a bug<\/li>\n<li>Testing the plugin<\/li>\n<li>Discussing the current state, features, improvements<\/li>\n<li>Submitting a fix or a new feature<\/li>\n<\/ul>\n\n<p>We use GitHub to host code, to track issues and feature requests, as well as accept pull requests.\nBy contributing, you agree that your contributions will be licensed under its GPLv2 License.<\/p>\n\n<!--section=installation-->\n<h4>Using The WordPress Dashboard<\/h4>\n\n<ol>\n<li>Navigate to the 'Add New' in the plugins dashboard<\/li>\n<li>Search for 'cf7-smtp'<\/li>\n<li>Click 'Install Now'<\/li>\n<li>Activate the plugin on the Plugin dashboard<\/li>\n<\/ol>\n\n<h4>Uploading in WordPress Dashboard<\/h4>\n\n<ol>\n<li>Navigate to the 'Add New' in the plugins dashboard<\/li>\n<li>Navigate to the 'Upload' area<\/li>\n<li>Select <code>cf7-smtp.zip<\/code> from your computer<\/li>\n<li>Click 'Install Now'<\/li>\n<li>Activate the plugin in the Plugin dashboard<\/li>\n<\/ol>\n\n<h4>Using FTP<\/h4>\n\n<ol>\n<li>Download <code>cf7-smtp.zip<\/code><\/li>\n<li>Extract the <code>cf7-smtp<\/code> directory to your computer<\/li>\n<li>Upload the <code>cf7-smtp<\/code> directory to the <code>\/wp-content\/plugins\/<\/code> directory<\/li>\n<li>Activate the plugin in the Plugin dashboard<\/li>\n<\/ol>\n\n<!--section=changelog-->\n<h4>1.1.0<\/h4>\n\n<ul>\n<li><strong>New:<\/strong> Added OAuth2 authentication support for Microsoft Office 365.<\/li>\n<li><strong>New:<\/strong> Per-form template selection! You can now assign specific custom templates to individual Contact Form 7 forms from the settings.<\/li>\n<li><strong>New:<\/strong> Custom templates are now supported inside your theme or child-theme folder (<code>your-theme\/cf7-smtp\/<\/code>).<\/li>\n<li><strong>New:<\/strong> SMTP Mode selection - choose whether to override all WordPress emails or just CF7.<\/li>\n<li><strong>Enhancement:<\/strong> Revamped automated reports with a beautiful HTML template.<\/li>\n<li><strong>Enhancement:<\/strong> Added log retention day settings and manual flush logs capability.<\/li>\n<li>thanks to @islp for reporting the issues related to \"from\" field and dashboard widget visibility<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Cleaner code, updated dependencies<\/li>\n<li>@DAnn2012 has contributed fixin a bug in a translation string<\/li>\n<\/ul>\n\n<h4>0.0.2<\/h4>\n\n<ul>\n<li>The configuration panel has been integrated with Contact Form 7 forms<\/li>\n<li>The widget which shows sent and unsent emails is now in the WordPress dashboard<\/li>\n<li>Fix an issue about password being reset when saving the plugin options<\/li>\n<\/ul>\n\n<h4>0.0.1<\/h4>\n\n<ul>\n<li>First Release<\/li>\n<\/ul>","raw_excerpt":"Secure your Contact Form 7 emails with this free SMTP plugin. It configures wp_mail() and features OAuth2, custom templates, and automated reports.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/da.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/165440","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/da.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/da.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/da.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=165440"}],"author":[{"embeddable":true,"href":"https:\/\/da.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/codekraft"}],"wp:attachment":[{"href":"https:\/\/da.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=165440"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/da.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=165440"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/da.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=165440"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/da.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=165440"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/da.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=165440"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/da.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=165440"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}