{"id":1076,"date":"2023-10-06T19:38:38","date_gmt":"2023-10-06T19:38:38","guid":{"rendered":"https:\/\/wpconsults.com\/?p=1076"},"modified":"2023-12-31T06:29:12","modified_gmt":"2023-12-31T06:29:12","slug":"configurer-smtp-manuellement-dans-wordpress-2","status":"publish","type":"post","link":"https:\/\/www.wpconsults.com\/fr\/configurer-smtp-manuellement-dans-wordpress-2\/","title":{"rendered":"Comment configurer manuellement le protocole SMTP dans WordPress"},"content":{"rendered":"\n<p>This article is here just for you, simplifying the process of setting up SMTP without the plugin drama. Think of it as a friendly chat, guiding you through the steps to make your WordPress emails soar. Let&#8217;s jump in and make your website&#8217;s communication a breeze!<\/p>\n\n\n<style>.wp-block-kadence-advancedheading.kt-adv-heading1076_36115d-b8, .wp-block-kadence-advancedheading.kt-adv-heading1076_36115d-b8[data-kb-block=\"kb-adv-heading1076_36115d-b8\"]{font-style:normal;}.wp-block-kadence-advancedheading.kt-adv-heading1076_36115d-b8 mark.kt-highlight, .wp-block-kadence-advancedheading.kt-adv-heading1076_36115d-b8[data-kb-block=\"kb-adv-heading1076_36115d-b8\"] mark.kt-highlight{font-style:normal;color:#f76a0c;-webkit-box-decoration-break:clone;box-decoration-break:clone;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;}.wp-block-kadence-advancedheading.kt-adv-heading1076_36115d-b8 img.kb-inline-image, .wp-block-kadence-advancedheading.kt-adv-heading1076_36115d-b8[data-kb-block=\"kb-adv-heading1076_36115d-b8\"] img.kb-inline-image{width:150px;vertical-align:baseline;}<\/style>\n<h2 class=\"kt-adv-heading1076_36115d-b8 wp-block-kadence-advancedheading\" data-kb-block=\"kb-adv-heading1076_36115d-b8\"><strong>Why Does SMTP Matter Anyway?<\/strong><\/h2>\n\n\n\n<p>Okay, so first things first \u2013 what&#8217;s SMTP? It&#8217;s like the postman of the internet world, ensuring your emails reach the right inbox. By default, WordPress uses something called PHP mail, but it can be a bit finicky. SMTP steps in to make sure your messages get where they need to go, without getting lost in spam folders.<\/p>\n\n\n<style>.wp-block-kadence-advancedheading.kt-adv-heading1076_39cb6f-4e, .wp-block-kadence-advancedheading.kt-adv-heading1076_39cb6f-4e[data-kb-block=\"kb-adv-heading1076_39cb6f-4e\"]{font-style:normal;}.wp-block-kadence-advancedheading.kt-adv-heading1076_39cb6f-4e mark.kt-highlight, .wp-block-kadence-advancedheading.kt-adv-heading1076_39cb6f-4e[data-kb-block=\"kb-adv-heading1076_39cb6f-4e\"] mark.kt-highlight{font-style:normal;color:#f76a0c;-webkit-box-decoration-break:clone;box-decoration-break:clone;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;}.wp-block-kadence-advancedheading.kt-adv-heading1076_39cb6f-4e img.kb-inline-image, .wp-block-kadence-advancedheading.kt-adv-heading1076_39cb6f-4e[data-kb-block=\"kb-adv-heading1076_39cb6f-4e\"] img.kb-inline-image{width:150px;vertical-align:baseline;}<\/style>\n<h2 class=\"kt-adv-heading1076_39cb6f-4e wp-block-kadence-advancedheading\" data-kb-block=\"kb-adv-heading1076_39cb6f-4e\"><strong>Let&#8217;s Make it Super Easy: Step-by-Step Guide<\/strong><\/h2>\n\n\n\n<p>To manually configure SMTP in WordPress, you&#8217;ll be working with two essential files: <code>wp-config.php<\/code> and <code>functions.php<\/code>. Here&#8217;s how to go about it:<\/p>\n\n\n<style>.wp-block-kadence-advancedheading.kt-adv-heading1076_2d9249-02, .wp-block-kadence-advancedheading.kt-adv-heading1076_2d9249-02[data-kb-block=\"kb-adv-heading1076_2d9249-02\"]{font-size:23px;font-style:normal;}.wp-block-kadence-advancedheading.kt-adv-heading1076_2d9249-02 mark.kt-highlight, .wp-block-kadence-advancedheading.kt-adv-heading1076_2d9249-02[data-kb-block=\"kb-adv-heading1076_2d9249-02\"] mark.kt-highlight{font-style:normal;color:#f76a0c;-webkit-box-decoration-break:clone;box-decoration-break:clone;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;}.wp-block-kadence-advancedheading.kt-adv-heading1076_2d9249-02 img.kb-inline-image, .wp-block-kadence-advancedheading.kt-adv-heading1076_2d9249-02[data-kb-block=\"kb-adv-heading1076_2d9249-02\"] img.kb-inline-image{width:150px;vertical-align:baseline;}<\/style>\n<h3 class=\"kt-adv-heading1076_2d9249-02 wp-block-kadence-advancedheading has-theme-palette-5-color has-text-color\" data-kb-block=\"kb-adv-heading1076_2d9249-02\"><strong>1. WordPress Configuration File (<code>wp-config.php<\/code>):<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Locate the <code>wp-config.php<\/code> file in your WordPress root directory.<\/li>\n\n\n\n<li>Open the file using a file manager, FTP, or SSH terminal.<\/li>\n\n\n\n<li>Add the following code snippet anywhere in the file, ensuring it precedes the line <code>\/* That\u2019s all, stop editing! Happy blogging. *\/<\/code>:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ SMTP email settings\ndefine( 'SMTP_USERNAME', 'example@gmail.com' );\ndefine( 'SMTP_PASSWORD', '1234567' );\ndefine( 'SMTP_SERVER', 'smtp.gmail.com' );\ndefine( 'SMTP_FROM', 'example@example.com' );\ndefine( 'SMTP_NAME', 'webtechstreet' );\ndefine( 'SMTP_PORT', '587' );\ndefine( 'SMTP_SECURE', 'tls' );\ndefine( 'SMTP_AUTH', true );\ndefine( 'SMTP_DEBUG', 0 );<\/code><\/pre>\n\n\n<style>.wp-block-kadence-advancedheading.kt-adv-heading1076_242ac4-0c, .wp-block-kadence-advancedheading.kt-adv-heading1076_242ac4-0c[data-kb-block=\"kb-adv-heading1076_242ac4-0c\"]{font-size:23px;font-style:normal;}.wp-block-kadence-advancedheading.kt-adv-heading1076_242ac4-0c mark.kt-highlight, .wp-block-kadence-advancedheading.kt-adv-heading1076_242ac4-0c[data-kb-block=\"kb-adv-heading1076_242ac4-0c\"] mark.kt-highlight{font-style:normal;color:#f76a0c;-webkit-box-decoration-break:clone;box-decoration-break:clone;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;}.wp-block-kadence-advancedheading.kt-adv-heading1076_242ac4-0c img.kb-inline-image, .wp-block-kadence-advancedheading.kt-adv-heading1076_242ac4-0c[data-kb-block=\"kb-adv-heading1076_242ac4-0c\"] img.kb-inline-image{width:150px;vertical-align:baseline;}<\/style>\n<h3 class=\"kt-adv-heading1076_242ac4-0c wp-block-kadence-advancedheading has-theme-palette-5-color has-text-color\" data-kb-block=\"kb-adv-heading1076_242ac4-0c\"><strong>2. Theme Function File (<code>functions.php<\/code>):<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Locate the <code>functions.php<\/code> file within your active theme folder.<\/li>\n\n\n\n<li>If you haven&#8217;t already, create a Child Theme (highly recommended for making changes).<\/li>\n\n\n\n<li>Add the following code snippet to <code>functions.php<\/code>:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>add_action( 'phpmailer_init', 'my_phpmailer_smtp' );\n\nfunction my_phpmailer_smtp( $phpmailer ) {\n    $phpmailer-&gt;isSMTP();\n    $phpmailer-&gt;Host = SMTP_SERVER;\n    $phpmailer-&gt;SMTPAuth = SMTP_AUTH;\n    $phpmailer-&gt;Port = SMTP_PORT;\n    $phpmailer-&gt;Username = SMTP_USERNAME;\n    $phpmailer-&gt;Password = SMTP_PASSWORD;\n    $phpmailer-&gt;SMTPSecure = SMTP_SECURE;\n    $phpmailer-&gt;From = SMTP_FROM;\n    $phpmailer-&gt;FromName = SMTP_NAME;\n}<\/code><\/pre>\n\n\n<style>.wp-block-kadence-advancedheading.kt-adv-heading1076_ea1cdf-03, .wp-block-kadence-advancedheading.kt-adv-heading1076_ea1cdf-03[data-kb-block=\"kb-adv-heading1076_ea1cdf-03\"]{font-style:normal;}.wp-block-kadence-advancedheading.kt-adv-heading1076_ea1cdf-03 mark.kt-highlight, .wp-block-kadence-advancedheading.kt-adv-heading1076_ea1cdf-03[data-kb-block=\"kb-adv-heading1076_ea1cdf-03\"] mark.kt-highlight{font-style:normal;color:#f76a0c;-webkit-box-decoration-break:clone;box-decoration-break:clone;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;}.wp-block-kadence-advancedheading.kt-adv-heading1076_ea1cdf-03 img.kb-inline-image, .wp-block-kadence-advancedheading.kt-adv-heading1076_ea1cdf-03[data-kb-block=\"kb-adv-heading1076_ea1cdf-03\"] img.kb-inline-image{width:150px;vertical-align:baseline;}<\/style>\n<h2 class=\"kt-adv-heading1076_ea1cdf-03 wp-block-kadence-advancedheading\" data-kb-block=\"kb-adv-heading1076_ea1cdf-03\"><strong>Don\u2019t Worry, There\u2019s a Shortcut Too!<\/strong><\/h2>\n\n\n\n<p>Feeling a bit overwhelmed? No problem! If playing with code isn\u2019t your thing, there are friendly plugins out there. They\u2019re like the ready-made cake mix \u2013 just pour, bake, and enjoy. There are tons of smtp plugins use one of them. <a href=\"https:\/\/wordpress.org\/plugins\/tags\/smtp\/\" data-type=\"link\" data-id=\"https:\/\/wordpress.org\/plugins\/tags\/smtp\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Check them here.<\/a><\/p>\n\n\n<style>.wp-block-kadence-advancedheading.kt-adv-heading1076_d9f2de-86, .wp-block-kadence-advancedheading.kt-adv-heading1076_d9f2de-86[data-kb-block=\"kb-adv-heading1076_d9f2de-86\"]{font-style:normal;}.wp-block-kadence-advancedheading.kt-adv-heading1076_d9f2de-86 mark.kt-highlight, .wp-block-kadence-advancedheading.kt-adv-heading1076_d9f2de-86[data-kb-block=\"kb-adv-heading1076_d9f2de-86\"] mark.kt-highlight{font-style:normal;color:#f76a0c;-webkit-box-decoration-break:clone;box-decoration-break:clone;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;}.wp-block-kadence-advancedheading.kt-adv-heading1076_d9f2de-86 img.kb-inline-image, .wp-block-kadence-advancedheading.kt-adv-heading1076_d9f2de-86[data-kb-block=\"kb-adv-heading1076_d9f2de-86\"] img.kb-inline-image{width:150px;vertical-align:baseline;}<\/style>\n<h2 class=\"kt-adv-heading1076_d9f2de-86 wp-block-kadence-advancedheading\" data-kb-block=\"kb-adv-heading1076_d9f2de-86\"><strong>In a Nutshell<\/strong><\/h2>\n\n\n\n<p>Setting up SMTP in WordPress doesn\u2019t have to be a headache. Whether you prefer the hands-on approach, adding a personal touch to your website\u2019s emails, or you opt for the simplicity of plugins, the choice is yours. So, go ahead, empower your WordPress site with the magic of smooth email communication. It\u2019s like giving your website a friendly, reliable voice \u2013 making sure your messages are heard loud and clear. Happy emailing! \ud83d\ude80\u2709\ufe0f<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Cet article est l\u00e0 juste pour vous, simplifiant le processus de mise en place du SMTP sans le drame des plugins. Consid\u00e9rez-le comme un chat amical, vous guidant \u00e0 travers les \u00e9tapes pour que vos emails WordPress s'envolent. Allons-y et faisons de la communication de votre site web un jeu d'enfant ! Pourquoi le SMTP est-il important ? Bon, tout d'abord...<\/p>","protected":false},"author":1,"featured_media":3246,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_sitemap_exclude":false,"_sitemap_priority":"","_sitemap_frequency":"","_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[7],"tags":[64],"class_list":["post-1076","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-wordpress-tips-tutorials","tag-without-plugin-series"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.wpconsults.com\/wp-content\/uploads\/2024\/05\/WpConsults-Default-post-thumbnail-jpg.webp?fit=1280%2C720&ssl=1","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pboFy3-hm","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/www.wpconsults.com\/fr\/wp-json\/wp\/v2\/posts\/1076","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wpconsults.com\/fr\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wpconsults.com\/fr\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wpconsults.com\/fr\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wpconsults.com\/fr\/wp-json\/wp\/v2\/comments?post=1076"}],"version-history":[{"count":0,"href":"https:\/\/www.wpconsults.com\/fr\/wp-json\/wp\/v2\/posts\/1076\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wpconsults.com\/fr\/wp-json\/wp\/v2\/media\/3246"}],"wp:attachment":[{"href":"https:\/\/www.wpconsults.com\/fr\/wp-json\/wp\/v2\/media?parent=1076"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wpconsults.com\/fr\/wp-json\/wp\/v2\/categories?post=1076"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wpconsults.com\/fr\/wp-json\/wp\/v2\/tags?post=1076"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}