{"id":4105,"date":"2016-01-08T07:10:15","date_gmt":"2016-01-07T23:10:15","guid":{"rendered":"https:\/\/blog-staging.tenten.co\/blog\/%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8-nodemailer-%e5%af%84%e9%80%81%e4%bf%a1%ef%bc%8c%e4%b8%8d%e7%94%a8-php-%e4%b9%9f%e5%8f%af%e4%bb%a5%e5%81%9a%e5%88%b0%ef%bc%81\/"},"modified":"2016-01-08T07:10:15","modified_gmt":"2016-01-07T23:10:15","slug":"%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8-nodemailer-%e5%af%84%e9%80%81%e4%bf%a1%ef%bc%8c%e4%b8%8d%e7%94%a8-php-%e4%b9%9f%e5%8f%af%e4%bb%a5%e5%81%9a%e5%88%b0%ef%bc%81","status":"publish","type":"post","link":"https:\/\/tenten.co\/blog\/tech\/%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8-nodemailer-%e5%af%84%e9%80%81%e4%bf%a1%ef%bc%8c%e4%b8%8d%e7%94%a8-php-%e4%b9%9f%e5%8f%af%e4%bb%a5%e5%81%9a%e5%88%b0%ef%bc%81\/","title":{"rendered":"\u4f7f\u7528 NodeMailer \u5bc4\u9001\u4fe1\uff0c\u4e0d\u7528 PHP \u4e5f\u53ef\u4ee5\u505a\u5230\uff01"},"content":{"rendered":"<p>\n\u6709\u4e9b\u975c\u614b\u9801\u9762\u90fd\u7528 Express \u53bb host\uff0c\u4f46\u662f\u7576\u6211\u5011\u524d\u7aef\u4e0d\u592a\u719f\u6089 PHP \u7684\u6642\u5019\uff0c\u9084\u771f\u662f\u6709\u9ede\u982d\u5927\u3002<\/p>\n<p>\u5c0f\u7de8\u5728\u627e\u5176\u4ed6\u9078\u64c7\u7684\u6642\u5019\u53e6\u5916\u4e00\u500b\u540c\u4e8b\u63a8\u85a6\u5c0f\u7de8\u4f7f\u7528 node \u4f86\u5bc4\u4fe1\u3002\u9019\u6642\u5c0f\u7de8\u975e\u5e38\u9a5a\u8a1d\uff01\u7adf\u7136\u53ef\u4ee5\u9019\u9ebc\u505a\uff0c\u65bc\u662f\u5c31 Google \u4e86\u4e00\u4e0b\u54ea\u4e9b\u5957\u4ef6\uff0c\u7d93\u904e\u56b4\u9078\uff0c\u89ba\u5f97\u9084\u662f\u9019\u500b NodeMailer \u9177\u591a\u4e86\u3002\u65bc\u6642\u5728\u6b64\u5f8c\u7684\u5c08\u6848\u90fd\u7528 NodeMailer \u5bc4\u4fe1\uff0c\u53ea\u80fd\u8aaa\uff0c\u5be6\u5728\u592a\u65b9\u4fbf\u5566\uff01\uff01\uff01<\/p>\n<p>\u524d\u63d0\u4e0b\uff0c\u6211\u5011\u662f\u4f7f\u7528 express + mustache template\u3002\u82e5\u6709 html \u7684\u9700\u6c42\uff0c\u53ef\u8a62\u554f\u3002\n<\/p>\n<h3>\u7528\u5230\u7684 modules:<\/h3>\n<ul>\n<li>nodemailer<\/li>\n<li>express<\/li>\n<li>bodyparser<\/li>\n<li>nodemailer-express-handlebars<\/li>\n<\/ul>\n<pre class=\"lang:js decode:true\">\/\/include all requirements\nvar nodemailer = require('nodemailer');\nvar express = require('express');\nvar mail = express();\nvar bodyParser = require('body-parser');\nvar mustache = require('nodemailer-express-handlebars');\n<\/pre>\n<p>\u4ee5\u4e0b\u7684\u9019\u500b\u60c5\u6cc1\u662f\u7576\u6211\u4f7f\u7528 Mustache \u70ba Template \u7684\u6642\u5019\uff0c\u4f46\u662f\u82e5\u8981\u7528 HTML \u57fa\u672c\u4e0a\u4e5f\u53ea\u8981\u63db\u4e00\u4e0b\u5c07 render \u90a3\u908a\u6539\u6389\uff0cmustache_options \u62ff\u6389\u5c31\u53ef\u4ee5\u4e86\u3002<\/p>\n<pre class=\"line-height:18 lang:js decode:true\">\/\/express post request to receive datas\nmail.post('\/mail', function(req, res) {\n    \/\/to allow localhosts etc.\n    res.header(\"Access-Control-Allow-Origin\", \"*\");\n    \/\/to throw you a feedback\n    res.status(200).json({\n        hasError: false\n    });\n    console.log(req.body);\n  \n    \/\/nodemailer settings needed to send emails\n    var transporter = nodemailer.createTransport({\n        service: 'Gmail',\n        auth: {\n            user: 'sender@sample.com',\n            pass: 'password'\n        }\n    });\n  \n    \/\/mail settings\n    var mail_options = {\n        from: req.body.name + '&lt;' + req.body.email + '&gt;',\n        to: 'sender@sample.com',\n        subject: 'From ' + req.body.name,\n        template: 'email',\n        context: req.body\n    };\n  \n    \/\/mustache settings\n    var mustache_options = {\n        viewEngine: {\n            extname: '.mustache',\n            layoutDir: 'mustache\/email'\n        },\n        viewPath: 'mustache\/email',\n        extName: '.mustache'\n    }\n  \n    \/\/render mustache\n    transporter.use('compile', mustache(mustache_options));\n     \n    \/\/send the mail out\n    transporter.sendMail(mail_options, function(error, info){\n        if(error){\n            return console.log(error);\n        }\n        console.log('Message sent: ' + info.response);\n    });\n});\n  \n\/\/tell the node to listen on port 7000\nvar server = mail.listen(7000, function() {\n    var host = server.address().address;\n    var port = server.address().port;\n    console.log('Mail is listening at http:\/\/%s:%s', host, port);\n});\n<\/pre>\n","protected":false},"excerpt":{"rendered":"\u6709\u4e9b\u975c\u614b\u9801\u9762\u90fd\u7528 Express \u53bb&hellip;","protected":false},"author":1,"featured_media":4109,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"csco_display_header_overlay":false,"csco_singular_sidebar":"","csco_page_header_type":"","footnotes":""},"categories":[296,361],"tags":[409,410,411,412,413,356,414,415],"ppma_author":[533],"class_list":["post-4105","post","type-post","status-publish","format-standard","has-post-thumbnail","category-tech","category-361","tag-express","tag-js","tag-mail","tag-node","tag-nodemailer","tag-php","tag-414","tag-415","cs-entry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u4f7f\u7528 NodeMailer \u5bc4\u9001\u4fe1\uff0c\u4e0d\u7528 PHP \u4e5f\u53ef\u4ee5\u505a\u5230\uff01 - Tenten Blog<\/title>\n<meta name=\"description\" content=\"\u6709\u4e9b\u975c\u614b\u9801\u9762\u90fd\u7528 Express \u53bb host\uff0c\u4f46\u662f\u7576\u6211\u5011\u524d\u7aef\u4e0d\u592a\u719f\u6089 PHP \u7684\u6642\u5019\uff0c\u9084\u771f\u662f\u6709\u9ede\u982d\u5927\u3002 \u5c0f\u7de8\u5728\u627e\u5176\u4ed6\u9078\u64c7\u7684\u6642\u5019\u53e6\u5916\u4e00\u500b\u540c\u4e8b\u63a8\u85a6\u5c0f\u7de8\u4f7f\u7528 node \u4f86\u5bc4\u4fe1\u3002\u9019\u6642\u5c0f\u7de8\u975e\u5e38\u9a5a\u8a1d\uff01\u7adf\u7136\u53ef\u4ee5\u9019\u9ebc\u505a\uff0c\u65bc\u662f\u5c31 Google \u4e86\u4e00\u4e0b\u54ea\u4e9b\u5957\u4ef6\uff0c\u7d93\u904e\u56b4\u9078\uff0c\u89ba\u5f97\u9084\u662f\u9019\u500b NodeMailer\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/tenten.co\/blog\/tech\/\u5982\u4f55\u4f7f\u7528-nodemailer-\u5bc4\u9001\u4fe1\uff0c\u4e0d\u7528-php-\u4e5f\u53ef\u4ee5\u505a\u5230\uff01\/\" \/>\n<meta property=\"og:locale\" content=\"zh_TW\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u4f7f\u7528 NodeMailer \u5bc4\u9001\u4fe1\uff0c\u4e0d\u7528 PHP \u4e5f\u53ef\u4ee5\u505a\u5230\uff01 - Tenten Blog\" \/>\n<meta property=\"og:description\" content=\"\u6709\u4e9b\u975c\u614b\u9801\u9762\u90fd\u7528 Express \u53bb host\uff0c\u4f46\u662f\u7576\u6211\u5011\u524d\u7aef\u4e0d\u592a\u719f\u6089 PHP \u7684\u6642\u5019\uff0c\u9084\u771f\u662f\u6709\u9ede\u982d\u5927\u3002 \u5c0f\u7de8\u5728\u627e\u5176\u4ed6\u9078\u64c7\u7684\u6642\u5019\u53e6\u5916\u4e00\u500b\u540c\u4e8b\u63a8\u85a6\u5c0f\u7de8\u4f7f\u7528 node \u4f86\u5bc4\u4fe1\u3002\u9019\u6642\u5c0f\u7de8\u975e\u5e38\u9a5a\u8a1d\uff01\u7adf\u7136\u53ef\u4ee5\u9019\u9ebc\u505a\uff0c\u65bc\u662f\u5c31 Google \u4e86\u4e00\u4e0b\u54ea\u4e9b\u5957\u4ef6\uff0c\u7d93\u904e\u56b4\u9078\uff0c\u89ba\u5f97\u9084\u662f\u9019\u500b NodeMailer\" \/>\n<meta property=\"og:url\" content=\"https:\/\/tenten.co\/blog\/tech\/\u5982\u4f55\u4f7f\u7528-nodemailer-\u5bc4\u9001\u4fe1\uff0c\u4e0d\u7528-php-\u4e5f\u53ef\u4ee5\u505a\u5230\uff01\/\" \/>\n<meta property=\"og:site_name\" content=\"Tenten Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/tentencreative\/\" \/>\n<meta property=\"article:published_time\" content=\"2016-01-07T23:10:15+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/s5.tenten.co\/2023\/12\/nodemailer.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"769\" \/>\n\t<meta property=\"og:image:height\" content=\"450\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Nancy P\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/tentencreative\" \/>\n<meta name=\"twitter:site\" content=\"@tentencreative\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005:\" \/>\n\t<meta name=\"twitter:data1\" content=\"Nancy P\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9810\u4f30\u95b1\u8b80\u6642\u9593\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\u9418\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/tenten.co\/blog\/tech\/%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8-nodemailer-%e5%af%84%e9%80%81%e4%bf%a1%ef%bc%8c%e4%b8%8d%e7%94%a8-php-%e4%b9%9f%e5%8f%af%e4%bb%a5%e5%81%9a%e5%88%b0%ef%bc%81\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/tenten.co\/blog\/tech\/%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8-nodemailer-%e5%af%84%e9%80%81%e4%bf%a1%ef%bc%8c%e4%b8%8d%e7%94%a8-php-%e4%b9%9f%e5%8f%af%e4%bb%a5%e5%81%9a%e5%88%b0%ef%bc%81\/\"},\"author\":{\"name\":\"Nancy P\",\"@id\":\"https:\/\/tenten.co\/blog\/#\/schema\/person\/b8f2cfaa5cdbcc9a9be32ad46da81aba\"},\"headline\":\"\u4f7f\u7528 NodeMailer \u5bc4\u9001\u4fe1\uff0c\u4e0d\u7528 PHP \u4e5f\u53ef\u4ee5\u505a\u5230\uff01\",\"datePublished\":\"2016-01-07T23:10:15+00:00\",\"dateModified\":\"2016-01-07T23:10:15+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/tenten.co\/blog\/tech\/%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8-nodemailer-%e5%af%84%e9%80%81%e4%bf%a1%ef%bc%8c%e4%b8%8d%e7%94%a8-php-%e4%b9%9f%e5%8f%af%e4%bb%a5%e5%81%9a%e5%88%b0%ef%bc%81\/\"},\"wordCount\":24,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/tenten.co\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/tenten.co\/blog\/tech\/%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8-nodemailer-%e5%af%84%e9%80%81%e4%bf%a1%ef%bc%8c%e4%b8%8d%e7%94%a8-php-%e4%b9%9f%e5%8f%af%e4%bb%a5%e5%81%9a%e5%88%b0%ef%bc%81\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/s5.tenten.co\/2023\/12\/nodemailer.jpg\",\"keywords\":[\"express\",\"js\",\"mail\",\"node\",\"nodemailer\",\"php\",\"\u5bc4\u4fe1\",\"\u9001\u4fe1\"],\"articleSection\":[\"Tech\",\"\u524d\u7aef\u5206\u4eab\"],\"inLanguage\":\"zh-TW\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/tenten.co\/blog\/tech\/%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8-nodemailer-%e5%af%84%e9%80%81%e4%bf%a1%ef%bc%8c%e4%b8%8d%e7%94%a8-php-%e4%b9%9f%e5%8f%af%e4%bb%a5%e5%81%9a%e5%88%b0%ef%bc%81\/\",\"url\":\"https:\/\/tenten.co\/blog\/tech\/%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8-nodemailer-%e5%af%84%e9%80%81%e4%bf%a1%ef%bc%8c%e4%b8%8d%e7%94%a8-php-%e4%b9%9f%e5%8f%af%e4%bb%a5%e5%81%9a%e5%88%b0%ef%bc%81\/\",\"name\":\"\u4f7f\u7528 NodeMailer \u5bc4\u9001\u4fe1\uff0c\u4e0d\u7528 PHP \u4e5f\u53ef\u4ee5\u505a\u5230\uff01 - Tenten Blog\",\"isPartOf\":{\"@id\":\"https:\/\/tenten.co\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/tenten.co\/blog\/tech\/%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8-nodemailer-%e5%af%84%e9%80%81%e4%bf%a1%ef%bc%8c%e4%b8%8d%e7%94%a8-php-%e4%b9%9f%e5%8f%af%e4%bb%a5%e5%81%9a%e5%88%b0%ef%bc%81\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/tenten.co\/blog\/tech\/%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8-nodemailer-%e5%af%84%e9%80%81%e4%bf%a1%ef%bc%8c%e4%b8%8d%e7%94%a8-php-%e4%b9%9f%e5%8f%af%e4%bb%a5%e5%81%9a%e5%88%b0%ef%bc%81\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/s5.tenten.co\/2023\/12\/nodemailer.jpg\",\"datePublished\":\"2016-01-07T23:10:15+00:00\",\"dateModified\":\"2016-01-07T23:10:15+00:00\",\"description\":\"\u6709\u4e9b\u975c\u614b\u9801\u9762\u90fd\u7528 Express \u53bb host\uff0c\u4f46\u662f\u7576\u6211\u5011\u524d\u7aef\u4e0d\u592a\u719f\u6089 PHP \u7684\u6642\u5019\uff0c\u9084\u771f\u662f\u6709\u9ede\u982d\u5927\u3002 \u5c0f\u7de8\u5728\u627e\u5176\u4ed6\u9078\u64c7\u7684\u6642\u5019\u53e6\u5916\u4e00\u500b\u540c\u4e8b\u63a8\u85a6\u5c0f\u7de8\u4f7f\u7528 node \u4f86\u5bc4\u4fe1\u3002\u9019\u6642\u5c0f\u7de8\u975e\u5e38\u9a5a\u8a1d\uff01\u7adf\u7136\u53ef\u4ee5\u9019\u9ebc\u505a\uff0c\u65bc\u662f\u5c31 Google \u4e86\u4e00\u4e0b\u54ea\u4e9b\u5957\u4ef6\uff0c\u7d93\u904e\u56b4\u9078\uff0c\u89ba\u5f97\u9084\u662f\u9019\u500b NodeMailer\",\"breadcrumb\":{\"@id\":\"https:\/\/tenten.co\/blog\/tech\/%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8-nodemailer-%e5%af%84%e9%80%81%e4%bf%a1%ef%bc%8c%e4%b8%8d%e7%94%a8-php-%e4%b9%9f%e5%8f%af%e4%bb%a5%e5%81%9a%e5%88%b0%ef%bc%81\/#breadcrumb\"},\"inLanguage\":\"zh-TW\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/tenten.co\/blog\/tech\/%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8-nodemailer-%e5%af%84%e9%80%81%e4%bf%a1%ef%bc%8c%e4%b8%8d%e7%94%a8-php-%e4%b9%9f%e5%8f%af%e4%bb%a5%e5%81%9a%e5%88%b0%ef%bc%81\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-TW\",\"@id\":\"https:\/\/tenten.co\/blog\/tech\/%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8-nodemailer-%e5%af%84%e9%80%81%e4%bf%a1%ef%bc%8c%e4%b8%8d%e7%94%a8-php-%e4%b9%9f%e5%8f%af%e4%bb%a5%e5%81%9a%e5%88%b0%ef%bc%81\/#primaryimage\",\"url\":\"https:\/\/s5.tenten.co\/2023\/12\/nodemailer.jpg\",\"contentUrl\":\"https:\/\/s5.tenten.co\/2023\/12\/nodemailer.jpg\",\"width\":769,\"height\":450},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/tenten.co\/blog\/tech\/%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8-nodemailer-%e5%af%84%e9%80%81%e4%bf%a1%ef%bc%8c%e4%b8%8d%e7%94%a8-php-%e4%b9%9f%e5%8f%af%e4%bb%a5%e5%81%9a%e5%88%b0%ef%bc%81\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/tenten.co\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u4f7f\u7528 NodeMailer \u5bc4\u9001\u4fe1\uff0c\u4e0d\u7528 PHP \u4e5f\u53ef\u4ee5\u505a\u5230\uff01\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/tenten.co\/blog\/#website\",\"url\":\"https:\/\/tenten.co\/blog\/\",\"name\":\"AI SEO by Tenten - AI-Powered SEO + Technical SEO\",\"description\":\"Shopify Plus\u3001Webflow \u8a8d\u8b49\u5c08\u5bb6\uff01Tenten \u5e6b\u4f60\u5feb\u901f\u5efa\u7f6e\u5c08\u696d\u7db2\u7ad9\",\"publisher\":{\"@id\":\"https:\/\/tenten.co\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/tenten.co\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"zh-TW\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/tenten.co\/blog\/#organization\",\"name\":\"AI SEO by Tenten - AI-Powered SEO + Technical SEO\",\"url\":\"https:\/\/tenten.co\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-TW\",\"@id\":\"https:\/\/tenten.co\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/s5.tenten.co\/2023\/12\/site-icon.png\",\"contentUrl\":\"https:\/\/s5.tenten.co\/2023\/12\/site-icon.png\",\"width\":512,\"height\":512,\"caption\":\"AI SEO by Tenten - AI-Powered SEO + Technical SEO\"},\"image\":{\"@id\":\"https:\/\/tenten.co\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/tentencreative\/\",\"https:\/\/x.com\/tentencreative\",\"https:\/\/www.linkedin.com\/company\/tentenco\",\"https:\/\/www.instagram.com\/tenten.co\",\"https:\/\/www.youtube.com\/user\/tentencreative\",\"https:\/\/dribbble.com\/tentenco\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/tenten.co\/blog\/#\/schema\/person\/b8f2cfaa5cdbcc9a9be32ad46da81aba\",\"name\":\"Nancy P\",\"description\":\"Experienced Stock Market Researcher and Financial Advisor with a passion for analyzing market trends and helping clients make informed investment decisions. Combining in-depth market knowledge with personalized financial planning to deliver tailored solutions for individuals and businesses.\",\"sameAs\":[\"https:\/\/tenten.co\",\"https:\/\/instagram.com\/tenten.co\",\"https:\/\/www.linkedin.com\/in\/pladoramaria\/\",\"https:\/\/x.com\/https:\/\/twitter.com\/tentencreative\",\"https:\/\/www.youtube.com\/@tentencreative\",\"https:\/\/twitter.com\/erikthought\"],\"url\":\"https:\/\/tenten.co\/blog\/author\/tenten\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u4f7f\u7528 NodeMailer \u5bc4\u9001\u4fe1\uff0c\u4e0d\u7528 PHP \u4e5f\u53ef\u4ee5\u505a\u5230\uff01 - Tenten Blog","description":"\u6709\u4e9b\u975c\u614b\u9801\u9762\u90fd\u7528 Express \u53bb host\uff0c\u4f46\u662f\u7576\u6211\u5011\u524d\u7aef\u4e0d\u592a\u719f\u6089 PHP \u7684\u6642\u5019\uff0c\u9084\u771f\u662f\u6709\u9ede\u982d\u5927\u3002 \u5c0f\u7de8\u5728\u627e\u5176\u4ed6\u9078\u64c7\u7684\u6642\u5019\u53e6\u5916\u4e00\u500b\u540c\u4e8b\u63a8\u85a6\u5c0f\u7de8\u4f7f\u7528 node \u4f86\u5bc4\u4fe1\u3002\u9019\u6642\u5c0f\u7de8\u975e\u5e38\u9a5a\u8a1d\uff01\u7adf\u7136\u53ef\u4ee5\u9019\u9ebc\u505a\uff0c\u65bc\u662f\u5c31 Google \u4e86\u4e00\u4e0b\u54ea\u4e9b\u5957\u4ef6\uff0c\u7d93\u904e\u56b4\u9078\uff0c\u89ba\u5f97\u9084\u662f\u9019\u500b NodeMailer","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/tenten.co\/blog\/tech\/\u5982\u4f55\u4f7f\u7528-nodemailer-\u5bc4\u9001\u4fe1\uff0c\u4e0d\u7528-php-\u4e5f\u53ef\u4ee5\u505a\u5230\uff01\/","og_locale":"zh_TW","og_type":"article","og_title":"\u4f7f\u7528 NodeMailer \u5bc4\u9001\u4fe1\uff0c\u4e0d\u7528 PHP \u4e5f\u53ef\u4ee5\u505a\u5230\uff01 - Tenten Blog","og_description":"\u6709\u4e9b\u975c\u614b\u9801\u9762\u90fd\u7528 Express \u53bb host\uff0c\u4f46\u662f\u7576\u6211\u5011\u524d\u7aef\u4e0d\u592a\u719f\u6089 PHP \u7684\u6642\u5019\uff0c\u9084\u771f\u662f\u6709\u9ede\u982d\u5927\u3002 \u5c0f\u7de8\u5728\u627e\u5176\u4ed6\u9078\u64c7\u7684\u6642\u5019\u53e6\u5916\u4e00\u500b\u540c\u4e8b\u63a8\u85a6\u5c0f\u7de8\u4f7f\u7528 node \u4f86\u5bc4\u4fe1\u3002\u9019\u6642\u5c0f\u7de8\u975e\u5e38\u9a5a\u8a1d\uff01\u7adf\u7136\u53ef\u4ee5\u9019\u9ebc\u505a\uff0c\u65bc\u662f\u5c31 Google \u4e86\u4e00\u4e0b\u54ea\u4e9b\u5957\u4ef6\uff0c\u7d93\u904e\u56b4\u9078\uff0c\u89ba\u5f97\u9084\u662f\u9019\u500b NodeMailer","og_url":"https:\/\/tenten.co\/blog\/tech\/\u5982\u4f55\u4f7f\u7528-nodemailer-\u5bc4\u9001\u4fe1\uff0c\u4e0d\u7528-php-\u4e5f\u53ef\u4ee5\u505a\u5230\uff01\/","og_site_name":"Tenten Blog","article_publisher":"https:\/\/www.facebook.com\/tentencreative\/","article_published_time":"2016-01-07T23:10:15+00:00","og_image":[{"width":769,"height":450,"url":"https:\/\/s5.tenten.co\/2023\/12\/nodemailer.jpg","type":"image\/jpeg"}],"author":"Nancy P","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/tentencreative","twitter_site":"@tentencreative","twitter_misc":{"\u4f5c\u8005:":"Nancy P","\u9810\u4f30\u95b1\u8b80\u6642\u9593":"1 \u5206\u9418"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/tenten.co\/blog\/tech\/%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8-nodemailer-%e5%af%84%e9%80%81%e4%bf%a1%ef%bc%8c%e4%b8%8d%e7%94%a8-php-%e4%b9%9f%e5%8f%af%e4%bb%a5%e5%81%9a%e5%88%b0%ef%bc%81\/#article","isPartOf":{"@id":"https:\/\/tenten.co\/blog\/tech\/%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8-nodemailer-%e5%af%84%e9%80%81%e4%bf%a1%ef%bc%8c%e4%b8%8d%e7%94%a8-php-%e4%b9%9f%e5%8f%af%e4%bb%a5%e5%81%9a%e5%88%b0%ef%bc%81\/"},"author":{"name":"Nancy P","@id":"https:\/\/tenten.co\/blog\/#\/schema\/person\/b8f2cfaa5cdbcc9a9be32ad46da81aba"},"headline":"\u4f7f\u7528 NodeMailer \u5bc4\u9001\u4fe1\uff0c\u4e0d\u7528 PHP \u4e5f\u53ef\u4ee5\u505a\u5230\uff01","datePublished":"2016-01-07T23:10:15+00:00","dateModified":"2016-01-07T23:10:15+00:00","mainEntityOfPage":{"@id":"https:\/\/tenten.co\/blog\/tech\/%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8-nodemailer-%e5%af%84%e9%80%81%e4%bf%a1%ef%bc%8c%e4%b8%8d%e7%94%a8-php-%e4%b9%9f%e5%8f%af%e4%bb%a5%e5%81%9a%e5%88%b0%ef%bc%81\/"},"wordCount":24,"commentCount":0,"publisher":{"@id":"https:\/\/tenten.co\/blog\/#organization"},"image":{"@id":"https:\/\/tenten.co\/blog\/tech\/%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8-nodemailer-%e5%af%84%e9%80%81%e4%bf%a1%ef%bc%8c%e4%b8%8d%e7%94%a8-php-%e4%b9%9f%e5%8f%af%e4%bb%a5%e5%81%9a%e5%88%b0%ef%bc%81\/#primaryimage"},"thumbnailUrl":"https:\/\/s5.tenten.co\/2023\/12\/nodemailer.jpg","keywords":["express","js","mail","node","nodemailer","php","\u5bc4\u4fe1","\u9001\u4fe1"],"articleSection":["Tech","\u524d\u7aef\u5206\u4eab"],"inLanguage":"zh-TW"},{"@type":"WebPage","@id":"https:\/\/tenten.co\/blog\/tech\/%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8-nodemailer-%e5%af%84%e9%80%81%e4%bf%a1%ef%bc%8c%e4%b8%8d%e7%94%a8-php-%e4%b9%9f%e5%8f%af%e4%bb%a5%e5%81%9a%e5%88%b0%ef%bc%81\/","url":"https:\/\/tenten.co\/blog\/tech\/%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8-nodemailer-%e5%af%84%e9%80%81%e4%bf%a1%ef%bc%8c%e4%b8%8d%e7%94%a8-php-%e4%b9%9f%e5%8f%af%e4%bb%a5%e5%81%9a%e5%88%b0%ef%bc%81\/","name":"\u4f7f\u7528 NodeMailer \u5bc4\u9001\u4fe1\uff0c\u4e0d\u7528 PHP \u4e5f\u53ef\u4ee5\u505a\u5230\uff01 - Tenten Blog","isPartOf":{"@id":"https:\/\/tenten.co\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/tenten.co\/blog\/tech\/%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8-nodemailer-%e5%af%84%e9%80%81%e4%bf%a1%ef%bc%8c%e4%b8%8d%e7%94%a8-php-%e4%b9%9f%e5%8f%af%e4%bb%a5%e5%81%9a%e5%88%b0%ef%bc%81\/#primaryimage"},"image":{"@id":"https:\/\/tenten.co\/blog\/tech\/%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8-nodemailer-%e5%af%84%e9%80%81%e4%bf%a1%ef%bc%8c%e4%b8%8d%e7%94%a8-php-%e4%b9%9f%e5%8f%af%e4%bb%a5%e5%81%9a%e5%88%b0%ef%bc%81\/#primaryimage"},"thumbnailUrl":"https:\/\/s5.tenten.co\/2023\/12\/nodemailer.jpg","datePublished":"2016-01-07T23:10:15+00:00","dateModified":"2016-01-07T23:10:15+00:00","description":"\u6709\u4e9b\u975c\u614b\u9801\u9762\u90fd\u7528 Express \u53bb host\uff0c\u4f46\u662f\u7576\u6211\u5011\u524d\u7aef\u4e0d\u592a\u719f\u6089 PHP \u7684\u6642\u5019\uff0c\u9084\u771f\u662f\u6709\u9ede\u982d\u5927\u3002 \u5c0f\u7de8\u5728\u627e\u5176\u4ed6\u9078\u64c7\u7684\u6642\u5019\u53e6\u5916\u4e00\u500b\u540c\u4e8b\u63a8\u85a6\u5c0f\u7de8\u4f7f\u7528 node \u4f86\u5bc4\u4fe1\u3002\u9019\u6642\u5c0f\u7de8\u975e\u5e38\u9a5a\u8a1d\uff01\u7adf\u7136\u53ef\u4ee5\u9019\u9ebc\u505a\uff0c\u65bc\u662f\u5c31 Google \u4e86\u4e00\u4e0b\u54ea\u4e9b\u5957\u4ef6\uff0c\u7d93\u904e\u56b4\u9078\uff0c\u89ba\u5f97\u9084\u662f\u9019\u500b NodeMailer","breadcrumb":{"@id":"https:\/\/tenten.co\/blog\/tech\/%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8-nodemailer-%e5%af%84%e9%80%81%e4%bf%a1%ef%bc%8c%e4%b8%8d%e7%94%a8-php-%e4%b9%9f%e5%8f%af%e4%bb%a5%e5%81%9a%e5%88%b0%ef%bc%81\/#breadcrumb"},"inLanguage":"zh-TW","potentialAction":[{"@type":"ReadAction","target":["https:\/\/tenten.co\/blog\/tech\/%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8-nodemailer-%e5%af%84%e9%80%81%e4%bf%a1%ef%bc%8c%e4%b8%8d%e7%94%a8-php-%e4%b9%9f%e5%8f%af%e4%bb%a5%e5%81%9a%e5%88%b0%ef%bc%81\/"]}]},{"@type":"ImageObject","inLanguage":"zh-TW","@id":"https:\/\/tenten.co\/blog\/tech\/%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8-nodemailer-%e5%af%84%e9%80%81%e4%bf%a1%ef%bc%8c%e4%b8%8d%e7%94%a8-php-%e4%b9%9f%e5%8f%af%e4%bb%a5%e5%81%9a%e5%88%b0%ef%bc%81\/#primaryimage","url":"https:\/\/s5.tenten.co\/2023\/12\/nodemailer.jpg","contentUrl":"https:\/\/s5.tenten.co\/2023\/12\/nodemailer.jpg","width":769,"height":450},{"@type":"BreadcrumbList","@id":"https:\/\/tenten.co\/blog\/tech\/%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8-nodemailer-%e5%af%84%e9%80%81%e4%bf%a1%ef%bc%8c%e4%b8%8d%e7%94%a8-php-%e4%b9%9f%e5%8f%af%e4%bb%a5%e5%81%9a%e5%88%b0%ef%bc%81\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/tenten.co\/blog\/"},{"@type":"ListItem","position":2,"name":"\u4f7f\u7528 NodeMailer \u5bc4\u9001\u4fe1\uff0c\u4e0d\u7528 PHP \u4e5f\u53ef\u4ee5\u505a\u5230\uff01"}]},{"@type":"WebSite","@id":"https:\/\/tenten.co\/blog\/#website","url":"https:\/\/tenten.co\/blog\/","name":"AI SEO by Tenten - AI-Powered SEO + Technical SEO","description":"Shopify Plus\u3001Webflow \u8a8d\u8b49\u5c08\u5bb6\uff01Tenten \u5e6b\u4f60\u5feb\u901f\u5efa\u7f6e\u5c08\u696d\u7db2\u7ad9","publisher":{"@id":"https:\/\/tenten.co\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/tenten.co\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-TW"},{"@type":"Organization","@id":"https:\/\/tenten.co\/blog\/#organization","name":"AI SEO by Tenten - AI-Powered SEO + Technical SEO","url":"https:\/\/tenten.co\/blog\/","logo":{"@type":"ImageObject","inLanguage":"zh-TW","@id":"https:\/\/tenten.co\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/s5.tenten.co\/2023\/12\/site-icon.png","contentUrl":"https:\/\/s5.tenten.co\/2023\/12\/site-icon.png","width":512,"height":512,"caption":"AI SEO by Tenten - AI-Powered SEO + Technical SEO"},"image":{"@id":"https:\/\/tenten.co\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/tentencreative\/","https:\/\/x.com\/tentencreative","https:\/\/www.linkedin.com\/company\/tentenco","https:\/\/www.instagram.com\/tenten.co","https:\/\/www.youtube.com\/user\/tentencreative","https:\/\/dribbble.com\/tentenco"]},{"@type":"Person","@id":"https:\/\/tenten.co\/blog\/#\/schema\/person\/b8f2cfaa5cdbcc9a9be32ad46da81aba","name":"Nancy P","description":"Experienced Stock Market Researcher and Financial Advisor with a passion for analyzing market trends and helping clients make informed investment decisions. Combining in-depth market knowledge with personalized financial planning to deliver tailored solutions for individuals and businesses.","sameAs":["https:\/\/tenten.co","https:\/\/instagram.com\/tenten.co","https:\/\/www.linkedin.com\/in\/pladoramaria\/","https:\/\/x.com\/https:\/\/twitter.com\/tentencreative","https:\/\/www.youtube.com\/@tentencreative","https:\/\/twitter.com\/erikthought"],"url":"https:\/\/tenten.co\/blog\/author\/tenten\/"}]}},"authors":[{"term_id":533,"user_id":1,"is_guest":0,"slug":"tenten","display_name":"Nancy P","avatar_url":{"url":"https:\/\/s5.tenten.co\/2024\/06\/Kelly-w.jpg","url2x":"https:\/\/s5.tenten.co\/2024\/06\/Kelly-w.jpg"},"first_name":"Nancy","last_name":"P","user_url":"https:\/\/tenten.co","job_title":"Marketer","tiktok":"","youtube":"https:\/\/www.youtube.com\/@tentencreative","linkedin":"https:\/\/www.linkedin.com\/in\/maria-ning\/","instagram":"https:\/\/instagram.com\/tenten.co","twitter":"https:\/\/twitter.com\/tentencreative","facebook":"","description":"Experienced Stock Market Researcher and Financial Advisor with a passion for analyzing market trends and helping clients make informed investment decisions. Combining in-depth market knowledge with personalized financial planning to deliver tailored solutions for individuals and businesses."}],"_links":{"self":[{"href":"https:\/\/tenten.co\/blog\/wp-json\/wp\/v2\/posts\/4105","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tenten.co\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tenten.co\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tenten.co\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tenten.co\/blog\/wp-json\/wp\/v2\/comments?post=4105"}],"version-history":[{"count":0,"href":"https:\/\/tenten.co\/blog\/wp-json\/wp\/v2\/posts\/4105\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tenten.co\/blog\/wp-json\/wp\/v2\/media\/4109"}],"wp:attachment":[{"href":"https:\/\/tenten.co\/blog\/wp-json\/wp\/v2\/media?parent=4105"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tenten.co\/blog\/wp-json\/wp\/v2\/categories?post=4105"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tenten.co\/blog\/wp-json\/wp\/v2\/tags?post=4105"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/tenten.co\/blog\/wp-json\/wp\/v2\/ppma_author?post=4105"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}