{"id":261,"date":"2022-09-06T12:33:34","date_gmt":"2022-09-06T03:33:34","guid":{"rendered":"https:\/\/trret.com\/?p=261"},"modified":"2022-09-06T12:33:36","modified_gmt":"2022-09-06T03:33:36","slug":"php-%ec%a7%80%eb%a9%94%ec%9d%bc%ec%9d%84-%ec%9d%b4%ec%9a%a9%ed%95%98%ec%97%ac-%eb%a9%94%ec%9d%bc%eb%b3%b4%eb%82%b4%ea%b8%b0-220530-%ea%b0%9c%ec%a0%95%ed%9b%84-phpmailer","status":"publish","type":"post","link":"https:\/\/trret.com\/?p=261","title":{"rendered":"[php] \uc9c0\uba54\uc77c\uc744 \uc774\uc6a9\ud558\uc5ec \uba54\uc77c\ubcf4\ub0b4\uae30 220530 \uac1c\uc815\ud6c4 (phpmailer)"},"content":{"rendered":"\n<p>\ubcf4\uc548 \uc218\uc900\uc774 \ub0ae\uc740 \uc571\uc758 \uc561\uc138\uc2a4\uac00 \uc0ac\ub77c\uc9d0\uc5d0 \ub530\ub77c<br>phpmailer\ub97c \uc4f0\uc2dc\ub294 \ubd84\ub4e4\uc774 \uac11\uc790\uae30 \uba54\uc77c\uc774 \uc548\ub418\ub294 \ud604\uc0c1\uc774 \uc77c\uc5b4\ub0ac\ub294\ub370<br>\uc774\uc81c\ub294 \ub2e4\ub978 \ubc29\ubc95\uc73c\ub85c \uc811\uc18d\uc744 \ud574\uc57c\ud569\ub2c8\ub2e4.<\/p>\n\n\n\n<p><strong>\uc21c\uc11c<\/strong><br>1. \uad6c\uae00\uacc4\uc815- \ubcf4\uc548- Google\uc5d0 \ub85c\uadf8\uc778- 2\ub2e8\uacc4\uc778\uc99d \uc0ac\uc6a9<br>2. 2\ub2e8\uacc4\uc778\uc99d \uc801\uc6a9\ud558\uba74 \uc571 \ube44\ubc00\ubc88\ud638 \ud0ed\uc774 \ub098\uc635\ub2c8\ub2e4. \ud074\ub9ad<br>3. \uc571 \ube44\ubc00\ubc88\ud638\ub97c \uc0dd\uc131\ud560 \uc571\uc740 &#8216;\uae30\ud0c0(\ub9de\ucda4)&#8217;<br>4. \uc774\ub984\uc740 \uc544\ubb34\ub807\uac8c\ub098 \ud574\ub3c4 \ub429\ub2c8\ub2e4 (\uc608: phpmailer)<\/p>\n\n\n\n<p>\uc774\ub807\uac8c \uc801\uc6a9\ud558\uba74 \ub2e4\uc2dc \uc774\uba54\uc77c\uc774 \ubcf4\ub0b4\uc9d1\ub2c8\ub2e4.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?php\n  use PHPMailer\\PHPMailer\\PHPMailer;\n  use PHPMailer\\PHPMailer\\SMTP;\n  use PHPMailer\\PHPMailer\\Exception;\n\n  require 'plugin\/PHPMailer\/src\/Exception.php';\n  require 'plugin\/PHPMailer\/src\/PHPMailer.php';\n  require 'plugin\/PHPMailer\/src\/SMTP.php';\n\n\t$sPhone = $_POST&#91;'sPhone'];\n\n\tif ( !is_null( $sPhone ) ) {\n\t\t$mail = new PHPMailer(true);\n\t        \/\/$mail->SMTPDebug  = 2;  \/\/\ub514\ubc84\uae45\uc2dc \ud544\uc694\n\t\t$mail->CharSet = PHPMailer::CHARSET_UTF8; \/\/\uc548\uc4f0\uba74 \ud55c\uae00\uae68\uc9d0\n\t\t$mail->SMTPAuth    = true;\n\t\t$mail->SMTPSecure  = 'ssl';\n\t\t$mail->Host        = 'smtp.gmail.com';\n\t\t$mail->Port        = 465;\n\t\t$mail->Mailer        = 'smtp';\n\t\t$mail->Username    = '\uc9c0\uba54\uc77c\uc8fc\uc18c';\n\t\t$mail->Password    = '<strong>\uc571 \ube44\ubc00\ubc88\ud638<\/strong>';\n\t\t$mail->addAddress('\uc218\uc2e0\uc790\uc774\uba54\uc77c\uc8fc\uc18c', 'Receiver');\n\t\t$mail->setFrom('\ubc1c\uc2e0\uc790\uc774\uba54\uc77c\uc8fc\uc18c', 'Sender');\n\t\t$mail->isHTML(true);\n\t\t$mail->Subject     = '\uba54\uc77c\uc774 \ubcf4\ub0b4\uc9c0\ub098\uc694?';\n\t\t$mail->Body        = 'Hello Gmail!';\n\t\t$mail->send();\n\t}  \n?><\/code><\/pre>\n\n\n\n<p>\uc804\uc5d0 \uc9c0\uba54\uc77c\ube44\ubc00\ubc88\ud638\uc801\ub294 \uc790\ub9ac\uc5d0 \uc571 \ube44\ubc00\ubc88\ud638\ub97c \uc801\uc73c\uc2dc\uba74 \ub429\ub2c8\ub2e4.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/PHPMailer\/PHPMailer\">https:\/\/github.com\/PHPMailer\/PHPMailer<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\ubcf4\uc548 \uc218\uc900\uc774 \ub0ae\uc740 \uc571\uc758 \uc561\uc138\uc2a4\uac00 \uc0ac\ub77c\uc9d0\uc5d0 \ub530\ub77cphpmailer\ub97c \uc4f0\uc2dc\ub294 \ubd84\ub4e4\uc774 \uac11\uc790\uae30 \uba54\uc77c\uc774 \uc548\ub418\ub294 \ud604\uc0c1\uc774 \uc77c\uc5b4\ub0ac\ub294\ub370\uc774\uc81c\ub294 \ub2e4\ub978 \ubc29\ubc95\uc73c\ub85c \uc811\uc18d\uc744 \ud574\uc57c\ud569\ub2c8\ub2e4. \uc21c\uc11c1. \uad6c\uae00\uacc4\uc815- \ubcf4\uc548- Google\uc5d0 \ub85c\uadf8\uc778- 2\ub2e8\uacc4\uc778\uc99d \uc0ac\uc6a92. 2\ub2e8\uacc4\uc778\uc99d \uc801\uc6a9\ud558\uba74 \uc571 \ube44\ubc00\ubc88\ud638 \ud0ed\uc774 \ub098\uc635\ub2c8\ub2e4. \ud074\ub9ad3. \uc571 \ube44\ubc00\ubc88\ud638\ub97c \uc0dd\uc131\ud560 \uc571\uc740 &#8216;\uae30\ud0c0(\ub9de\ucda4)&#8217;4. \uc774\ub984\uc740 \uc544\ubb34\ub807\uac8c\ub098 \ud574\ub3c4 \ub429\ub2c8\ub2e4 (\uc608: phpmailer) \uc774\ub807\uac8c \uc801\uc6a9\ud558\uba74 \ub2e4\uc2dc \uc774\uba54\uc77c\uc774 \ubcf4\ub0b4\uc9d1\ub2c8\ub2e4. \uc804\uc5d0 \uc9c0\uba54\uc77c\ube44\ubc00\ubc88\ud638\uc801\ub294 <a href=\"https:\/\/trret.com\/?p=261\" class=\"btn btn-link continue-link\">\ub354 \uc77d\uae30<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[8],"tags":[],"_links":{"self":[{"href":"https:\/\/trret.com\/index.php?rest_route=\/wp\/v2\/posts\/261"}],"collection":[{"href":"https:\/\/trret.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/trret.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/trret.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/trret.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=261"}],"version-history":[{"count":4,"href":"https:\/\/trret.com\/index.php?rest_route=\/wp\/v2\/posts\/261\/revisions"}],"predecessor-version":[{"id":265,"href":"https:\/\/trret.com\/index.php?rest_route=\/wp\/v2\/posts\/261\/revisions\/265"}],"wp:attachment":[{"href":"https:\/\/trret.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=261"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/trret.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=261"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/trret.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=261"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}