{"id":2289,"date":"2024-06-05T20:12:26","date_gmt":"2024-06-05T12:12:26","guid":{"rendered":"https:\/\/cn.raksmart.com\/blog\/host\/3701.html"},"modified":"2024-06-05T20:12:26","modified_gmt":"2024-06-05T12:12:26","slug":"wordpress%e7%bd%91%e7%ab%99%e5%a6%82%e4%bd%95%e8%ae%be%e7%bd%ae%e9%82%ae%e4%bb%b6%e8%87%aa%e5%8a%a8%e6%8f%90%e9%86%92%e5%8a%9f%e8%83%bd%ef%bc%8csmtp%e8%ae%be%e7%bd%ae%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/cn.raksmart.com\/blog\/domain\/qyyx\/2289.html","title":{"rendered":"WordPress\u7f51\u7ad9\u5982\u4f55\u8bbe\u7f6e\u90ae\u4ef6\u81ea\u52a8\u63d0\u9192\u529f\u80fd\uff0cSMTP\u8bbe\u7f6e\uff1f"},"content":{"rendered":"<div class=\"entry-content e-content\" itemprop=\"description articleBody\">\n<p>\u4ec0\u4e48\u662fWordPress\u7f51\u7ad9\u81ea\u52a8\u63d0\u9192\u529f\u80fd\uff0c\u4e5f\u5c31\u662f\u5f53\u6709\u4eba\u5728\u4f60\u7684\u7f51\u7ad9\u4e0a\u7559\u4e0b\u8bc4\u8bba\uff0c\u4e0b\u8ba2\u5355\uff0c\u6ce8\u518c\u767b\u5f55\u7b49\uff0c\u7f51\u7ad9\u90fd\u4f1a\u81ea\u52a8\u53d1\u4e00\u6761\u901a\u77e5\u4fe1\u606f\u5230\u4f60\u8bbe\u7f6e\u597d\u7684\u90ae\u7bb1\u4e2d\u3002<a href=\"https:\/\/www.raksmart.com\/cps\/7821\" target=\"_blank\" rel=\"noopener\">raksmart<\/a><a href=\"https:\/\/cn.raksmart.com\/\" target=\"_blank\" rel=\"noopener\"><strong>\u9999\u6e2fVPS\u4e3b\u673a\u5546<\/strong><\/a>\u5206\u4eabWordPress\u7f51\u7ad9\u5982\u4f55\u8bbe\u7f6e\u90ae\u4ef6\u81ea\u52a8\u63d0\u9192\u529f\u80fd\uff0cSMTP\u8bbe\u7f6e\uff1f<\/p>\n<p>\u4e00\u3001\u4e3a\u4ec0\u4e48\u8981\u8bbe\u7f6e\u90ae\u4ef6\u81ea\u52a8\u63d0\u9192\u529f\u80fd?<\/p>\n<p>1\u3001\u4f5c\u4e3a\u4e00\u4e2a\u7f51\u7ad9\u62e5\u6709\u8005\uff0c\u5f53\u7136\u662f\u5e0c\u671b\u7b2c\u4e00\u65f6\u95f4\u4e86\u89e3\u7f51\u7ad9\u7684\u52a8\u6001\uff0c\u53ca\u65f6\u5904\u7406\u8bc4\u8bba\u3001\u8ba2\u5355\u3002\u5982\u679c\u4f60\u662f\u505a\u7f51\u7edc\u9500\u552e\u7684\uff0c\u90a3\u4e48\u6709\u4e86\u8ba2\u5355\uff0c\u66f4\u9700\u8981\u7b2c\u4e00\u65f6\u95f4\u6765\u5904\u7406\u8ba2\u5355\u62c9\uff0c\u90a3\u53ef\u662f\u94b1\u554a!<\/p>\n<p>2\u3001wordpress\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u9ed8\u8ba4\u662f\u65e0\u6cd5\u81ea\u52a8\u53d1\u9001\u90ae\u4ef6\u63d0\u9192\u7684\u3002\u6bd4\u5982\u4f60\u5728\u7f51\u7ad9\u4e0a\u6dfb\u52a0\u4e86\u8054\u7cfb\u8868\u5355\uff0c\u81ea\u5df1\u53d1\u9001\u4e0b\u8868\u5355\uff0c\u53ef\u4ee5\u53d1\u73b0\u662f\u65e0\u6cd5\u53d1\u9001\u6210\u529f\u7684\u3002\u63a8\u8350\u9605\u8bfb\uff1a<a href=\"https:\/\/cn.raksmart.com\/blog\/domain\/qyyx\/1952.html\" target=\"_blank\" rel=\"noopener\">\u300a\u7533\u8bf7\u90ae\u4ef6\u670d\u52a1\u4e2d\u7684\u76f8\u5173\u534f\u8bae\u300b<\/a><\/p>\n<p>\u4e8c\u3001\u600e\u4e48\u8bbe\u7f6e\u90ae\u4ef6\u81ea\u52a8\u63d0\u9192\u529f\u80fd?<\/p>\n<p>\u65b9\u6cd5\u4e00\uff0c\u975e\u63d2\u4ef6\uff0c\u4ee3\u7801\u65b9\u5f0f<\/p>\n<p>\u672c\u7740\u80fd\u4e0d\u7528\u63d2\u4ef6\u5c31\u4e0d\u7528\u63d2\u4ef6\u7684\u539f\u5219\uff0c\u63d2\u4ef6\u8d8a\u591a\u53ef\u80fd\u5bfc\u81f4\u7f51\u7ad9\u53d8\u6162\u3001\u4e0d\u5b89\u5168\u3002<\/p>\n<p>\u5728\u5b50\u4e3b\u9898functions.php\u6587\u4ef6\u4e2d\u6dfb\u52a0\u5982\u4e0b\u4ee3\u7801\uff1a<\/p>\n<p>\/\/WordPress SMTP\u8bbe\u7f6e\u53d1\u9001\u90ae\u4ef6\u529f\u80fd<\/p>\n<p>add_action(\u2018phpmailer_init\u2019, \u2018mail_smtp\u2019);<\/p>\n<p>function mail_smtp( $phpmailer ) {<\/p>\n<p>$phpmailer-&gt;FromName = \u2018\u81ea\u7531\u8d85\u2019; \/\/\u53d1\u9001\u4eba\u59d3\u540d<\/p>\n<p>$phpmailer-&gt;Host = \u2018smtp.yeah.net\u2019; \/\/\u53d1\u9001\u90ae\u4ef6\u670d\u52a1\u5668<\/p>\n<p>$phpmailer-&gt;Port = 465; \/\/\u4f7f\u7528SSL\uff0c\u7aef\u53e3\u53f7465\u6216587<\/p>\n<p>$phpmailer-&gt;Username = \u2018xxx@yeah.net\u2019; \/\/\u90ae\u4ef6\u8d26\u53f7<\/p>\n<p>$phpmailer-&gt;Password = \u2018xxx\u2019; \/\/\u6ce8\u610f\u8fd9\u91cc\u586b\u6388\u6743\u7801<\/p>\n<p>$phpmailer-&gt;From = \u2018xxx@yeah.net\u2019;\/\/\u90ae\u4ef6\u8d26\u53f7<\/p>\n<p>$phpmailer-&gt;SMTPAuth = true;<\/p>\n<p>$phpmailer-&gt;SMTPSecure = \u2018ssl\u2019; \/\/\u4f7f\u7528ssl<\/p>\n<p>$phpmailer-&gt;IsSMTP();<\/p>\n<p>}<\/p>\n<p>\u6ce8\u610f\u4ee5\u4e0a\u4ee3\u7801\u4e2d\uff0c\u7ea2\u8272\u6807\u6ce8\u7684\u90e8\u5206\u662f\u9700\u8981\u4fee\u6539\u7684\uff0c\u600e\u4e48\u4fee\u6539\uff0c\u9700\u8981\u4f60\u5230\u81ea\u5df1\u90ae\u7bb1\u8bbe\u7f6e\u4e2d\u5fc3\u53bb\u627e\u5230\u76f8\u5e94\u7684\u4fe1\u606f\uff0c\u7136\u540e\u6dfb\u52a0\u66ff\u6362\u5230\u4ee3\u7801\u4e2d\u3002\u6700\u540e\u5c06\u4fee\u6539\u540e\u7684\u4ee3\u7801\u653e\u5165\u4e3b\u9898funcitons.php\u6587\u4ef6\u4e2d\u3002<\/p>\n<p>\u65b9\u6cd5\u4e8c\uff0c\u63d2\u4ef6\u65b9\u5f0f<\/p>\n<p>\u5982\u679c\u4f60\u5b9e\u5728\u4e0d\u60f3\u6298\u817e\u4ee3\u7801\uff0c\u89c9\u5f97\u9ebb\u70e6\uff0c\u90a3\u4e48\u63a8\u8350\u63d2\u4ef6Post SMTP\u8fd9\u4e2a\u63d2\u4ef6\u3002\u4e3a\u4ec0\u4e48\u63a8\u8350\u8fd9\u4e2a\u63d2\u4ef6\uff0c\u7b2c\u4e00\uff0c\u8bbe\u7f6e\u7b80\u5355;\u7b2c\u4e8c\uff0c\u6709\u90ae\u4ef6\u53d1\u9001\u8bb0\u5f55\u529f\u80fd\u3002\u63a8\u8350\u9605\u8bfb\uff1a<a href=\"https:\/\/cn.raksmart.com\/blog\/website\/wordpress\/806.html\" target=\"_blank\" rel=\"noopener\">\u300a\u4ec0\u4e48\u662fSMTP\u300b<\/a><\/p>\n<p>1\u3001\u5b89\u88c5Post Smtp\uff0c\u5230\u540e\u53f0\u641c\u7d22\uff0c\u6216\u5230\u63d2\u4ef6\u5b98\u7f51\u4e0b\u8f7d<\/p>\n<p>2\u3001\u5b89\u88c5\u4e4b\u540e\uff0c\u70b9\u51fb\u201cstart the wizard\u201d\u8fdb\u884c\u8bbe\u7f6e<\/p>\n<p>3\u3001\u586b\u5199\u53d1\u4ef6\u90ae\u7bb1\u5730\u5740\u3001\u53d1\u4ef6\u540d\u79f0<\/p>\n<p>4\u3001\u586b\u5165\u53d1\u4ef6\u7bb1\u670d\u52a1\u5668\u540d\u79f0<\/p>\n<p>\u8fd9\u4e2a\u8981\u5230\u54ea\u91cc\u627e\u90a3\uff0c\u5230\u4f60\u7684\u90ae\u7bb1\u540e\u53f0\uff0c\u4e00\u822c\u90fd\u5728\u8bbe\u7f6e\u4e2d\u53ef\u4ee5\u627e\u5230\u3002\u901a\u5e38\u662f\u4ee5smtp.qq.com\u7b49\u5f62\u5f0f\u3002\u6bd4\u5982\u6211\u8fd9\u91cc\u662f\u7528smtp.yeah.net\u3002\u5982\u679c\u5b9e\u5728\u4e0d\u4f1a\u767e\u5ea6\u6216google\u641c\u7d22\u5173\u952e\u8bcd\uff1axx\u90ae\u7bb1 smtp<\/p>\n<p>5\u3001\u9009\u62e9\u7aef\u53e3\u3002\u901a\u5e38\u60c5\u51b5\u4e0b\u4e3aSSL\uff0c\u7aef\u53e3\u53f7\u4e3a465<\/p>\n<p>\u4e0d\u540c\u7684\u90ae\u7bb1\u7684\u7aef\u53e3\u53f7\u4e5f\u662f\u4e0d\u540c\u7684\uff0c\u53c2\u8003\u4e0a\u4e00\u6b65\u9aa44\uff0c\u5728\u90ae\u7bb1\u540e\u53f0\u8bbe\u7f6e\u4e2d\u90fd\u80fd\u627e\u5230\u3002<\/p>\n<p>6\u3001\u586b\u5165\u53d1\u4ef6\u90ae\u7bb1\u5730\u5740\u548c\u90ae\u7bb1\u5bc6\u7801<\/p>\n<p>\u8fd9\u5730\u65b9\u9700\u8981\u7279\u522b\u6ce8\u610f\u4e0b\uff0c\u6709\u4e9b\u90ae\u7bb1\u586b\u5165\u7684\u4e0d\u662f\u90ae\u7bb1\u767b\u5f55\u5bc6\u7801\uff0c\u800c\u662f\u90ae\u7bb1\u6388\u6743\u7801\uff0c\u8fd8\u662f\u4e00\u6837\u7684\u5230\u4f60\u7684\u90ae\u7bb1\u5e2e\u52a9\u4e2d\u5fc3\u627e\u5230\u6388\u6743\u7801\u3002\u4e0d\u540c\u90ae\u7bb1\u65b9\u6cd5\u7565\u6709\u4e0d\u540c\u3002<\/p>\n<p>7\u3001\u65e0\u9700\u7279\u522b\u505a\u4ec0\u4e48\uff0cnext\uff0cfinish?<\/p>\n<p>8\u3001\u56de\u5230\u8bbe\u7f6e\u9875\u9762\uff0c\u5bf9\u8bbe\u7f6e\u7ed3\u679c\u8fdb\u884c\u6d4b\u8bd5\u3002\u70b9\u51fbSend a Test Email<\/p>\n<p>\u5982\u679c\u770b\u5230\u90ae\u4ef6\u53d1\u9001\u6210\u529f\uff0c\u540c\u65f6\u5230\u4f60\u7684\u9ed8\u8ba4\u7f51\u7ad9\u63d0\u9192\u6536\u4ef6\u90ae\u7bb1\u67e5\u770b\u5230\u90ae\u4ef6\uff0c\u90a3\u4e48\u606d\u559c\u4f60\uff0c\u8bbe\u7f6e\u6210\u529f\u62c9!?<\/p>\n<p>\u5982\u679c\u8fd8\u4e0d\u6210\u529f\uff0c\u4ece\u65b0\u56de\u987e\u4e0b\u8bbe\u7f6e\u8fc7\u7a0b!\u63a8\u8fdb\u76f8\u5173\u9605\u8bfb\uff1a<a href=\"https:\/\/cn.raksmart.com\/blog\/knowledge\/1645.html\">\u300a\u5982\u4f55\u963b\u6b62\u5783\u573e\u90ae\u4ef6\u300b<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4ec0\u4e48\u662fWordPress\u7f51\u7ad9\u81ea\u52a8\u63d0\u9192\u529f\u80fd\uff0c\u4e5f\u5c31\u662f\u5f53\u6709\u4eba\u5728\u4f60\u7684\u7f51\u7ad9\u4e0a\u7559\u4e0b\u8bc4\u8bba\uff0c\u4e0b\u8ba2\u5355\uff0c\u6ce8\u518c\u767b\u5f55\u7b49\uff0c\u7f51\u7ad9\u2026 <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23,6],"tags":[723,639,724],"class_list":["post-2289","post","type-post","status-publish","format-standard","hentry","category-wordpress","category-qyyx","tag-smtp","tag-wordpress","tag-724"],"_links":{"self":[{"href":"https:\/\/cn.raksmart.com\/blog\/wp-json\/wp\/v2\/posts\/2289","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cn.raksmart.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cn.raksmart.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cn.raksmart.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cn.raksmart.com\/blog\/wp-json\/wp\/v2\/comments?post=2289"}],"version-history":[{"count":0,"href":"https:\/\/cn.raksmart.com\/blog\/wp-json\/wp\/v2\/posts\/2289\/revisions"}],"wp:attachment":[{"href":"https:\/\/cn.raksmart.com\/blog\/wp-json\/wp\/v2\/media?parent=2289"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cn.raksmart.com\/blog\/wp-json\/wp\/v2\/categories?post=2289"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cn.raksmart.com\/blog\/wp-json\/wp\/v2\/tags?post=2289"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}