{"id":3992,"date":"2017-11-15T08:03:00","date_gmt":"2017-11-15T08:03:00","guid":{"rendered":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/?p=3992"},"modified":"2024-04-24T09:01:02","modified_gmt":"2024-04-24T08:01:02","slug":"send-email-php-script-using-smtp-authentication","status":"publish","type":"post","link":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/send-email-php-script-using-smtp-authentication\/","title":{"rendered":"Send Email From a PHP Script Using SMTP Authentication"},"content":{"rendered":"<p>When sending email it is recommended to use SMTP authentication for sending emails. If you are not using any CMS OR a custom coded website, use the steps below to enable SMTP authentication in your contact form.<\/p>\n<p>Login to your cPanel &amp; access option <strong>PHP PEAR Packages<\/strong>. Under <strong>Find a \u201cPHP Extensions and Applications Package\u201d<\/strong>, find for mail and click on Go. Install Mail which is listed under the Module Name as below.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3993\" src=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2017\/11\/Screen-Shot-2017-11-15-at-1.23.03-PM.png\" alt=\"\" width=\"1360\" height=\"639\" srcset=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2017\/11\/Screen-Shot-2017-11-15-at-1.23.03-PM.png 1360w, https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2017\/11\/Screen-Shot-2017-11-15-at-1.23.03-PM-300x141.png 300w, https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2017\/11\/Screen-Shot-2017-11-15-at-1.23.03-PM-768x361.png 768w, https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2017\/11\/Screen-Shot-2017-11-15-at-1.23.03-PM-1024x481.png 1024w\" sizes=\"auto, (max-width: 1360px) 100vw, 1360px\" \/><\/p>\n<p>Once you install the above package, download the contact.php file with a sample contact.html page from http:\/\/ecloudwire.com\/contact.tar<\/p>\n<p>Replace the details below with the actual ones.<\/p>\n<ul>\n<li>from: the email address from which you want the message to be sent<\/li>\n<li>to: the recipient&#8217;s email address and name.<\/li>\n<li>host: your outgoing SMTP server name.<\/li>\n<li>username: the SMTP user name (typically the same as the username used to retrieve mail).<\/li>\n<li>password: the password for SMTP authentication.<\/li>\n<\/ul>\n<p>Once done, you can try sending the emails and the emails would be sent using SMTP authentication.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When sending email it is recommended to use SMTP authentication for sending emails. If you are not using any CMS OR a custom coded website, use the steps below to enable SMTP authentication in your contact form. Login to your cPanel &amp; access option PHP PEAR Packages. Under Find a \u201cPHP Extensions and Applications Package\u201d, [&hellip;]<\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-3992","post","type-post","status-publish","format-standard","placeholder-for-hentry","category-domain-name-dns-issues"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Send Email From a PHP Script Using SMTP Authentication<\/title>\n<meta name=\"description\" content=\"In this tutorial, we will show you how to send email using SMTP authentication from a PHP script.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/send-email-php-script-using-smtp-authentication\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Send Email From a PHP Script Using SMTP Authentication\" \/>\n<meta property=\"og:description\" content=\"In this tutorial, we will show you how to send email using SMTP authentication from a PHP script.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/send-email-php-script-using-smtp-authentication\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Hosting FAQs by MilesWeb\" \/>\n<meta property=\"article:published_time\" content=\"2017-11-15T08:03:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-24T08:01:02+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2017\/11\/Screen-Shot-2017-11-15-at-1.23.03-PM.png\" \/>\n<meta name=\"author\" content=\"Chinmay Dingore\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Chinmay Dingore\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/send-email-php-script-using-smtp-authentication\/\",\"url\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/send-email-php-script-using-smtp-authentication\/\",\"name\":\"Send Email From a PHP Script Using SMTP Authentication\",\"isPartOf\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/send-email-php-script-using-smtp-authentication\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/send-email-php-script-using-smtp-authentication\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2017\/11\/Screen-Shot-2017-11-15-at-1.23.03-PM.png\",\"datePublished\":\"2017-11-15T08:03:00+00:00\",\"dateModified\":\"2024-04-24T08:01:02+00:00\",\"author\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/dede1f85ff210bb6edccd736a1dfa256\"},\"description\":\"In this tutorial, we will show you how to send email using SMTP authentication from a PHP script.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/send-email-php-script-using-smtp-authentication\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/send-email-php-script-using-smtp-authentication\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/send-email-php-script-using-smtp-authentication\/#primaryimage\",\"url\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2017\/11\/Screen-Shot-2017-11-15-at-1.23.03-PM.png\",\"contentUrl\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2017\/11\/Screen-Shot-2017-11-15-at-1.23.03-PM.png\",\"width\":1360,\"height\":639},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/send-email-php-script-using-smtp-authentication\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Send Email From a PHP Script Using SMTP Authentication\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website\",\"url\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/\",\"name\":\"Web Hosting FAQs by MilesWeb\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/dede1f85ff210bb6edccd736a1dfa256\",\"name\":\"Chinmay Dingore\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/0d0115bf9737e455dd489276ed81b139?s=96&d=blank&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/0d0115bf9737e455dd489276ed81b139?s=96&d=blank&r=g\",\"caption\":\"Chinmay Dingore\"},\"description\":\"With over 10+ years of experience in the web hosting industry, I have achieved extensive exposure to result-oriented methodologies. And expertise in different domains like Datacentre Services, Cloud computing technology, Web hosting industry and many more.\",\"sameAs\":[\"https:\/\/www.milesweb.co.uk\/\"],\"url\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/author\/chinmay\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Send Email From a PHP Script Using SMTP Authentication","description":"In this tutorial, we will show you how to send email using SMTP authentication from a PHP script.","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:\/\/www.milesweb.co.uk\/hosting-faqs\/send-email-php-script-using-smtp-authentication\/","og_locale":"en_GB","og_type":"article","og_title":"Send Email From a PHP Script Using SMTP Authentication","og_description":"In this tutorial, we will show you how to send email using SMTP authentication from a PHP script.","og_url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/send-email-php-script-using-smtp-authentication\/","og_site_name":"Web Hosting FAQs by MilesWeb","article_published_time":"2017-11-15T08:03:00+00:00","article_modified_time":"2024-04-24T08:01:02+00:00","og_image":[{"url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2017\/11\/Screen-Shot-2017-11-15-at-1.23.03-PM.png","type":"","width":"","height":""}],"author":"Chinmay Dingore","twitter_misc":{"Written by":"Chinmay Dingore","Estimated reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/send-email-php-script-using-smtp-authentication\/","url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/send-email-php-script-using-smtp-authentication\/","name":"Send Email From a PHP Script Using SMTP Authentication","isPartOf":{"@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/send-email-php-script-using-smtp-authentication\/#primaryimage"},"image":{"@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/send-email-php-script-using-smtp-authentication\/#primaryimage"},"thumbnailUrl":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2017\/11\/Screen-Shot-2017-11-15-at-1.23.03-PM.png","datePublished":"2017-11-15T08:03:00+00:00","dateModified":"2024-04-24T08:01:02+00:00","author":{"@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/dede1f85ff210bb6edccd736a1dfa256"},"description":"In this tutorial, we will show you how to send email using SMTP authentication from a PHP script.","breadcrumb":{"@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/send-email-php-script-using-smtp-authentication\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.milesweb.co.uk\/hosting-faqs\/send-email-php-script-using-smtp-authentication\/"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/send-email-php-script-using-smtp-authentication\/#primaryimage","url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2017\/11\/Screen-Shot-2017-11-15-at-1.23.03-PM.png","contentUrl":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2017\/11\/Screen-Shot-2017-11-15-at-1.23.03-PM.png","width":1360,"height":639},{"@type":"BreadcrumbList","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/send-email-php-script-using-smtp-authentication\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/"},{"@type":"ListItem","position":2,"name":"Send Email From a PHP Script Using SMTP Authentication"}]},{"@type":"WebSite","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website","url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/","name":"Web Hosting FAQs by MilesWeb","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Person","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/dede1f85ff210bb6edccd736a1dfa256","name":"Chinmay Dingore","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/0d0115bf9737e455dd489276ed81b139?s=96&d=blank&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0d0115bf9737e455dd489276ed81b139?s=96&d=blank&r=g","caption":"Chinmay Dingore"},"description":"With over 10+ years of experience in the web hosting industry, I have achieved extensive exposure to result-oriented methodologies. And expertise in different domains like Datacentre Services, Cloud computing technology, Web hosting industry and many more.","sameAs":["https:\/\/www.milesweb.co.uk\/"],"url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/author\/chinmay\/"}]}},"views":4947,"_links":{"self":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts\/3992","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/comments?post=3992"}],"version-history":[{"count":8,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts\/3992\/revisions"}],"predecessor-version":[{"id":15712,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts\/3992\/revisions\/15712"}],"wp:attachment":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/media?parent=3992"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/categories?post=3992"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/tags?post=3992"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}