{"id":676,"date":"2011-08-26T13:40:12","date_gmt":"2011-08-26T17:40:12","guid":{"rendered":"https:\/\/www.inmotionhosting.com\/support\/2011\/08\/26\/using-phpmailer-to-send-mail-through-php\/"},"modified":"2026-09-11T09:13:37","modified_gmt":"2026-09-11T13:13:37","slug":"using-phpmailer-to-send-mail-through-php","status":"publish","type":"post","link":"https:\/\/www.inmotionhosting.com\/support\/website\/using-phpmailer-to-send-mail-through-php\/","title":{"rendered":"Using PHPMailer to Send Mail through PHP"},"content":{"rendered":"<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"538\" src=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2022\/02\/PHPMailer-Send-Email-From-PHP-1024x538.png\" alt=\"PHPMailer - Send Email From PHP\" class=\"wp-image-94056\" srcset=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2022\/02\/PHPMailer-Send-Email-From-PHP-1024x538.png 1024w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2022\/02\/PHPMailer-Send-Email-From-PHP-300x158.png 300w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2022\/02\/PHPMailer-Send-Email-From-PHP-768x403.png 768w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2022\/02\/PHPMailer-Send-Email-From-PHP.png 1200w\" sizes=\"auto, (min-width: 1360px) 876px, (min-width: 960px) calc(61.58vw + 51px), calc(100vw - 80px)\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">You want to send mail through PHP, but PHP\u2019s built-in <code>mail()<\/code> function doesn\u2019t support authenticated SMTP (Simple Mail Transfer Protocol), and cPanel mail servers require authentication for outgoing mail. PHPMailer solves that problem: it is a popular, actively maintained, open-source library that adds authenticated SMTP, attachments, and HTML formatting to outgoing mail from your PHP code. This guide walks through a working example you can adapt for local development or a live InMotion Hosting account.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The sample script targets PHPMailer\u2019s current namespaced 6.x and 7.x classes (<code>PHPMailer\\PHPMailer\\PHPMailer<\/code>), not the older <code>class.phpmailer.php<\/code> file.<\/p>\n\n\n\n<p class=\"alert alert-info wp-block-paragraph\"><strong>Note:<\/strong> Download the current release of PHPMailer from its <a href=\"https:\/\/github.com\/PHPMailer\/PHPMailer\">GitHub repository<\/a>, or install it with Composer as shown next. Learn more about InMotion Hosting\u2019s <a href=\"https:\/\/www.inmotionhosting.com\/php-hosting\">PHP hosting<\/a> plans.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Install the PHPMailer Dependencies<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Composer is the recommended way to add PHPMailer to your project. It downloads the library, resolves its dependencies, and generates the autoloader your script needs, all with one command. Run this from your project\u2019s root directory:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">composer<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">require<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">phpmailer\/phpmailer<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Composer creates a <code>vendor\/<\/code> directory and a <code>vendor\/autoload.php<\/code> file. Require that file at the top of your script and every class PHPMailer needs becomes available automatically.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you cannot use Composer, download the latest release from PHPMailer\u2019s GitHub repository instead, and require <code>src\/Exception.php<\/code>, <code>src\/PHPMailer.php<\/code>, and <code>src\/SMTP.php<\/code> directly from the extracted archive.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Add the Code to Send Mail through PHP<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Before you run the script, change the example values in the table to match your own sender, recipient, and mail server details.<\/p>\n\n\n\n<figure class=\"wp-block-table is-style-stripes\"><table><thead><tr><th>Sample<\/th><th>Replace with<\/th><\/tr><\/thead><tbody><tr><td>robot@example.com<\/td><td>Your sender email address<\/td><\/tr><tr><td>mail.example.com<\/td><td>Your SMTP server hostname<\/td><\/tr><tr><td>password<\/td><td>Your sender email account\u2019s password<\/td><\/tr><tr><td>joe@example.com<\/td><td>Your recipient\u2019s email address<\/td><\/tr><tr><td>Name of sender<\/td><td>The display name for your sender address<\/td><\/tr><tr><td>Name of recipient<\/td><td>The display name for your recipient address<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Not sure what to put in the host, port, or username fields? Those are the same settings you would enter in an email client. See <a href=\"\/support\/email\/how-to-find-email-settings\/\">how to find your email settings in cPanel or Webmail<\/a> to look them up. On an InMotion Hosting cPanel account, the username is always the mailbox\u2019s full email address, and the recommended outgoing setting is SMTP port 465 with SSL\/TLS. To use that port instead of the sample\u2019s port 587, set <code>Port<\/code> to <code>465<\/code> and <code>SMTPSecure<\/code> to <code>PHPMailer::ENCRYPTION_SMTPS<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Local development:<\/strong> Leave <code>$developmentMode<\/code> set to <code>true<\/code>. The script then prints the full SMTP conversation and relaxes certificate checks, which is normal for a local server with a self-signed certificate.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Live server:<\/strong> Set <code>$developmentMode<\/code> to <code>false<\/code> before you deploy. The script then hides the SMTP transcript and enforces normal certificate validation, which is what you want once mail goes out to real recipients.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F97583\">&lt;?<\/span><span style=\"color: #79B8FF\">php<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F97583\">require<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">\"vendor\/autoload.php\"<\/span><span style=\"color: #E1E4E8\">;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #F97583\">use<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">PHPMailer\\PHPMailer\\PHPMailer<\/span><span style=\"color: #E1E4E8\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F97583\">use<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">PHPMailer\\PHPMailer\\SMTP<\/span><span style=\"color: #E1E4E8\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F97583\">use<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">PHPMailer\\PHPMailer\\Exception<\/span><span style=\"color: #E1E4E8\">;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">$developmentMode <\/span><span style=\"color: #F97583\">=<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">true<\/span><span style=\"color: #E1E4E8\">;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">$mailer <\/span><span style=\"color: #F97583\">=<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #F97583\">new<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">PHPMailer<\/span><span style=\"color: #E1E4E8\">(<\/span><span style=\"color: #79B8FF\">true<\/span><span style=\"color: #E1E4E8\">);<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #F97583\">try<\/span><span style=\"color: #E1E4E8\"> {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    $mailer<\/span><span style=\"color: #F97583\">-&gt;<\/span><span style=\"color: #E1E4E8\">SMTPDebug <\/span><span style=\"color: #F97583\">=<\/span><span style=\"color: #E1E4E8\"> $developmentMode <\/span><span style=\"color: #F97583\">?<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">SMTP<\/span><span style=\"color: #F97583\">::<\/span><span style=\"color: #79B8FF\">DEBUG_SERVER<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #F97583\">:<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">SMTP<\/span><span style=\"color: #F97583\">::<\/span><span style=\"color: #79B8FF\">DEBUG_OFF<\/span><span style=\"color: #E1E4E8\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    $mailer<\/span><span style=\"color: #F97583\">-&gt;<\/span><span style=\"color: #B392F0\">isSMTP<\/span><span style=\"color: #E1E4E8\">();<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #F97583\">if<\/span><span style=\"color: #E1E4E8\"> ($developmentMode) {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">        $mailer<\/span><span style=\"color: #F97583\">-&gt;<\/span><span style=\"color: #E1E4E8\">SMTPOptions <\/span><span style=\"color: #F97583\">=<\/span><span style=\"color: #E1E4E8\"> [<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">            <\/span><span style=\"color: #9ECBFF\">'ssl'<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #F97583\">=&gt;<\/span><span style=\"color: #E1E4E8\"> [<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">                <\/span><span style=\"color: #9ECBFF\">'verify_peer'<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #F97583\">=&gt;<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">false<\/span><span style=\"color: #E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">                <\/span><span style=\"color: #9ECBFF\">'verify_peer_name'<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #F97583\">=&gt;<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">false<\/span><span style=\"color: #E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">                <\/span><span style=\"color: #9ECBFF\">'allow_self_signed'<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #F97583\">=&gt;<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">true<\/span><span style=\"color: #E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">            ],<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">        ];<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    }<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    $mailer<\/span><span style=\"color: #F97583\">-&gt;<\/span><span style=\"color: #E1E4E8\">Host <\/span><span style=\"color: #F97583\">=<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">'mail.example.com'<\/span><span style=\"color: #E1E4E8\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    $mailer<\/span><span style=\"color: #F97583\">-&gt;<\/span><span style=\"color: #E1E4E8\">SMTPAuth <\/span><span style=\"color: #F97583\">=<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">true<\/span><span style=\"color: #E1E4E8\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    $mailer<\/span><span style=\"color: #F97583\">-&gt;<\/span><span style=\"color: #E1E4E8\">Username <\/span><span style=\"color: #F97583\">=<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">'robot@example.com'<\/span><span style=\"color: #E1E4E8\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    $mailer<\/span><span style=\"color: #F97583\">-&gt;<\/span><span style=\"color: #E1E4E8\">Password <\/span><span style=\"color: #F97583\">=<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">'password'<\/span><span style=\"color: #E1E4E8\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    $mailer<\/span><span style=\"color: #F97583\">-&gt;<\/span><span style=\"color: #E1E4E8\">SMTPSecure <\/span><span style=\"color: #F97583\">=<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">PHPMailer<\/span><span style=\"color: #F97583\">::<\/span><span style=\"color: #79B8FF\">ENCRYPTION_STARTTLS<\/span><span style=\"color: #E1E4E8\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    $mailer<\/span><span style=\"color: #F97583\">-&gt;<\/span><span style=\"color: #E1E4E8\">Port <\/span><span style=\"color: #F97583\">=<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">587<\/span><span style=\"color: #E1E4E8\">;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    $mailer<\/span><span style=\"color: #F97583\">-&gt;<\/span><span style=\"color: #B392F0\">setFrom<\/span><span style=\"color: #E1E4E8\">(<\/span><span style=\"color: #9ECBFF\">'robot@example.com'<\/span><span style=\"color: #E1E4E8\">, <\/span><span style=\"color: #9ECBFF\">'Name of sender'<\/span><span style=\"color: #E1E4E8\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    $mailer<\/span><span style=\"color: #F97583\">-&gt;<\/span><span style=\"color: #B392F0\">addAddress<\/span><span style=\"color: #E1E4E8\">(<\/span><span style=\"color: #9ECBFF\">'joe@example.com'<\/span><span style=\"color: #E1E4E8\">, <\/span><span style=\"color: #9ECBFF\">'Name of recipient'<\/span><span style=\"color: #E1E4E8\">);<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    $mailer<\/span><span style=\"color: #F97583\">-&gt;<\/span><span style=\"color: #B392F0\">isHTML<\/span><span style=\"color: #E1E4E8\">(<\/span><span style=\"color: #79B8FF\">true<\/span><span style=\"color: #E1E4E8\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    $mailer<\/span><span style=\"color: #F97583\">-&gt;<\/span><span style=\"color: #E1E4E8\">Subject <\/span><span style=\"color: #F97583\">=<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">'PHPMailer Test'<\/span><span style=\"color: #E1E4E8\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    $mailer<\/span><span style=\"color: #F97583\">-&gt;<\/span><span style=\"color: #E1E4E8\">Body <\/span><span style=\"color: #F97583\">=<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">'This is a &lt;b&gt;SAMPLE&lt;\/b&gt; email sent through &lt;b&gt;PHPMailer&lt;\/b&gt;'<\/span><span style=\"color: #E1E4E8\">;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    $mailer<\/span><span style=\"color: #F97583\">-&gt;<\/span><span style=\"color: #B392F0\">send<\/span><span style=\"color: #E1E4E8\">();<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #79B8FF\">echo<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">\"MAIL HAS BEEN SENT SUCCESSFULLY\"<\/span><span style=\"color: #E1E4E8\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">} <\/span><span style=\"color: #F97583\">catch<\/span><span style=\"color: #E1E4E8\"> (<\/span><span style=\"color: #79B8FF\">Exception<\/span><span style=\"color: #E1E4E8\"> $e) {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #79B8FF\">echo<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">\"EMAIL SENDING FAILED. INFO: \"<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #F97583\">.<\/span><span style=\"color: #E1E4E8\"> $mailer<\/span><span style=\"color: #F97583\">-&gt;<\/span><span style=\"color: #E1E4E8\">ErrorInfo;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">A note about the closing PHP tag<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">PHP does not require a closing <code>?&gt;<\/code> tag at the end of a file, and the script above leaves it out on purpose. The PHP manual recommends omitting it, because accidental whitespace or a new line after the tag sends output early, which is a classic cause of the \u201cheaders already sent\u201d error. Two situations call for different handling:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Pure PHP file:<\/strong> Omit the closing tag completely, exactly as the sample above does.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F97583\">&lt;?<\/span><span style=\"color: #E1E4E8\">php<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">require<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">\"vendor\/autoload.php\"<\/span><span style=\"color: #E1E4E8\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">\/\/<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">PHP<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">code<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">continues<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">to<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">the<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">end<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">of<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">the<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">file<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>PHP mixed with HTML or other markup:<\/strong> Add <code>?&gt;<\/code> right before the HTML begins, then omit the closing tag again at the end of the file.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F97583\">&lt;?<\/span><span style=\"color: #E1E4E8\">php<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">require<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">\"vendor\/autoload.php\"<\/span><span style=\"color: #E1E4E8\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">\/\/<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">PHP<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">code<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F97583\">?&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F97583\">&lt;<\/span><span style=\"color: #E1E4E8\">html<\/span><span style=\"color: #F97583\">&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">  <\/span><span style=\"color: #F97583\">&lt;<\/span><span style=\"color: #B392F0\">body&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #F97583\">&lt;<\/span><span style=\"color: #B392F0\">p&gt;Message<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">sent.<\/span><span style=\"color: #F97583\">&lt;<\/span><span style=\"color: #9ECBFF\">\/<\/span><span style=\"color: #E1E4E8\">p<\/span><span style=\"color: #F97583\">&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">  <\/span><span style=\"color: #F97583\">&lt;<\/span><span style=\"color: #B392F0\">\/body&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F97583\">&lt;<\/span><span style=\"color: #E1E4E8\">\/html<\/span><span style=\"color: #F97583\">&gt;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">If the Message Does Not Send<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If the script prints \u201cEMAIL SENDING FAILED. INFO: \u2026\u201d instead of the success message, PHPMailer threw an exception because something in the send failed. Set <code>$developmentMode<\/code> to <code>true<\/code> temporarily so PHPMailer prints the full SMTP transcript instead of the generic error message. Most failures trace back to an incorrect host, port, username, or password, so check those values against your mailbox\u2019s settings first. If the connection itself fails or times out, work through <a href=\"\/support\/website\/why-wont-my-php-app-send-mail\/\">why won\u2019t my PHP app send mail?<\/a> next.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Save the script, upload it to your server, and load it in a browser. A successful run prints \u201cMAIL HAS BEEN SENT SUCCESSFULLY\u201d and hands the message to your mail server for delivery. If you only need to send a simple message without SMTP authentication, compare this approach with <a href=\"\/support\/website\/using-the-php-mail-function-to-send-emails\/\">PHP\u2019s built-in mail() function<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You want to send mail through PHP, but PHP&#8217;s built-in mail() function doesn&#8217;t support authenticated SMTP (Simple Mail Transfer Protocol), and cPanel mail servers require authentication for outgoing mail. PHPMailer solves that problem: it is a popular, actively maintained, open-source library that adds authenticated SMTP, attachments, and HTML formatting to outgoing mail from your PHP<a class=\"moretag\" href=\"https:\/\/www.inmotionhosting.com\/support\/website\/using-phpmailer-to-send-mail-through-php\/\"> Read More ><\/a><\/p>\n","protected":false},"author":17,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_ayudawp_aiss_exclude":false,"_ayudawp_aiss_exclude_summary":false,"_ayudawp_aiss_summary":"You want to send mail through PHP, but PHP's built-in function doesn't support authenticated SMTP (Simple Mail Transfer Protocol), and cPanel mail servers require authentication for outgoing mail. PHPMailer solves that problem: it is a popular, actively maintained, open-source library that adds authenticated SMTP, attachments, and HTML formatting to outgoing mail from your PHP code. If you only need to send a simple message without SMTP authentication, compare this approach with PHP's built-in mail() function.","_ayudawp_aiss_summary_provider":"extractive","_ayudawp_aiss_summary_hash":"8f3cd11cb1a97d0a05285f842c7a2b255660e693","_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[4288],"tags":[],"class_list":["post-676","post","type-post","status-publish","format-standard","hentry","category-website"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Using PHPMailer to Send Mail through PHP<\/title>\n<meta name=\"description\" content=\"Learn how to send mail through PHP with PHPMailer, from installing the library with Composer to fixing common SMTP send errors.\" \/>\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.inmotionhosting.com\/support\/website\/using-phpmailer-to-send-mail-through-php\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Using PHPMailer to Send Mail through PHP\" \/>\n<meta property=\"og:description\" content=\"Learn how to send mail through PHP with PHPMailer, from installing the library with Composer to fixing common SMTP send errors.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.inmotionhosting.com\/support\/website\/using-phpmailer-to-send-mail-through-php\/\" \/>\n<meta property=\"og:site_name\" content=\"InMotion Hosting Support Center\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/inmotionhosting\/\" \/>\n<meta property=\"article:published_time\" content=\"2011-08-26T17:40:12+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-09-11T13:13:37+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2022\/02\/PHPMailer-Send-Email-From-PHP.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Christopher Maiorana\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@InMotionHosting\" \/>\n<meta name=\"twitter:site\" content=\"@InMotionHosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Christopher Maiorana\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/website\\\/using-phpmailer-to-send-mail-through-php\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/website\\\/using-phpmailer-to-send-mail-through-php\\\/\"},\"author\":{\"name\":\"Christopher Maiorana\",\"@id\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/#\\\/schema\\\/person\\\/c6922c56c84e17079fd558e07b7ef72f\"},\"headline\":\"Using PHPMailer to Send Mail through PHP\",\"datePublished\":\"2011-08-26T17:40:12+00:00\",\"dateModified\":\"2026-09-11T13:13:37+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/website\\\/using-phpmailer-to-send-mail-through-php\\\/\"},\"wordCount\":680,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/website\\\/using-phpmailer-to-send-mail-through-php\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/PHPMailer-Send-Email-From-PHP-1024x538.png\",\"articleSection\":[\"Website\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/website\\\/using-phpmailer-to-send-mail-through-php\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/website\\\/using-phpmailer-to-send-mail-through-php\\\/\",\"url\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/website\\\/using-phpmailer-to-send-mail-through-php\\\/\",\"name\":\"Using PHPMailer to Send Mail through PHP\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/website\\\/using-phpmailer-to-send-mail-through-php\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/website\\\/using-phpmailer-to-send-mail-through-php\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/PHPMailer-Send-Email-From-PHP-1024x538.png\",\"datePublished\":\"2011-08-26T17:40:12+00:00\",\"dateModified\":\"2026-09-11T13:13:37+00:00\",\"description\":\"Learn how to send mail through PHP with PHPMailer, from installing the library with Composer to fixing common SMTP send errors.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/website\\\/using-phpmailer-to-send-mail-through-php\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/website\\\/using-phpmailer-to-send-mail-through-php\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/website\\\/using-phpmailer-to-send-mail-through-php\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/PHPMailer-Send-Email-From-PHP.png\",\"contentUrl\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/PHPMailer-Send-Email-From-PHP.png\",\"width\":1200,\"height\":630},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/website\\\/using-phpmailer-to-send-mail-through-php\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Using PHPMailer to Send Mail through PHP\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/#website\",\"url\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/\",\"name\":\"InMotion Hosting Support Center\",\"description\":\"Web Hosting Support &amp; Tutorials\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/#organization\",\"name\":\"InMotion Hosting\",\"url\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/wp-content\\\/uploads\\\/2023\\\/02\\\/inmotion-hosting-logo-yoast.jpg\",\"contentUrl\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/wp-content\\\/uploads\\\/2023\\\/02\\\/inmotion-hosting-logo-yoast.jpg\",\"width\":696,\"height\":696,\"caption\":\"InMotion Hosting\"},\"image\":{\"@id\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/inmotionhosting\\\/\",\"https:\\\/\\\/x.com\\\/InMotionHosting\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/#\\\/schema\\\/person\\\/c6922c56c84e17079fd558e07b7ef72f\",\"name\":\"Christopher Maiorana\",\"description\":\"Christopher Maiorana joined the InMotion community team in 2015 and regularly dispenses tips and tricks in the Support Center, Community Q&A, and the InMotion Hosting Blog.\",\"sameAs\":[\"https:\\\/\\\/www.linkedin.com\\\/in\\\/chris-m-4623144b\\\/\"],\"url\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/author\\\/christopherm\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Using PHPMailer to Send Mail through PHP","description":"Learn how to send mail through PHP with PHPMailer, from installing the library with Composer to fixing common SMTP send errors.","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.inmotionhosting.com\/support\/website\/using-phpmailer-to-send-mail-through-php\/","og_locale":"en_US","og_type":"article","og_title":"Using PHPMailer to Send Mail through PHP","og_description":"Learn how to send mail through PHP with PHPMailer, from installing the library with Composer to fixing common SMTP send errors.","og_url":"https:\/\/www.inmotionhosting.com\/support\/website\/using-phpmailer-to-send-mail-through-php\/","og_site_name":"InMotion Hosting Support Center","article_publisher":"https:\/\/www.facebook.com\/inmotionhosting\/","article_published_time":"2011-08-26T17:40:12+00:00","article_modified_time":"2026-09-11T13:13:37+00:00","og_image":[{"width":1200,"height":630,"url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2022\/02\/PHPMailer-Send-Email-From-PHP.png","type":"image\/png"}],"author":"Christopher Maiorana","twitter_card":"summary_large_image","twitter_creator":"@InMotionHosting","twitter_site":"@InMotionHosting","twitter_misc":{"Written by":"Christopher Maiorana","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.inmotionhosting.com\/support\/website\/using-phpmailer-to-send-mail-through-php\/#article","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/website\/using-phpmailer-to-send-mail-through-php\/"},"author":{"name":"Christopher Maiorana","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/c6922c56c84e17079fd558e07b7ef72f"},"headline":"Using PHPMailer to Send Mail through PHP","datePublished":"2011-08-26T17:40:12+00:00","dateModified":"2026-09-11T13:13:37+00:00","mainEntityOfPage":{"@id":"https:\/\/www.inmotionhosting.com\/support\/website\/using-phpmailer-to-send-mail-through-php\/"},"wordCount":680,"commentCount":0,"publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/support\/website\/using-phpmailer-to-send-mail-through-php\/#primaryimage"},"thumbnailUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2022\/02\/PHPMailer-Send-Email-From-PHP-1024x538.png","articleSection":["Website"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.inmotionhosting.com\/support\/website\/using-phpmailer-to-send-mail-through-php\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.inmotionhosting.com\/support\/website\/using-phpmailer-to-send-mail-through-php\/","url":"https:\/\/www.inmotionhosting.com\/support\/website\/using-phpmailer-to-send-mail-through-php\/","name":"Using PHPMailer to Send Mail through PHP","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.inmotionhosting.com\/support\/website\/using-phpmailer-to-send-mail-through-php\/#primaryimage"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/support\/website\/using-phpmailer-to-send-mail-through-php\/#primaryimage"},"thumbnailUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2022\/02\/PHPMailer-Send-Email-From-PHP-1024x538.png","datePublished":"2011-08-26T17:40:12+00:00","dateModified":"2026-09-11T13:13:37+00:00","description":"Learn how to send mail through PHP with PHPMailer, from installing the library with Composer to fixing common SMTP send errors.","breadcrumb":{"@id":"https:\/\/www.inmotionhosting.com\/support\/website\/using-phpmailer-to-send-mail-through-php\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.inmotionhosting.com\/support\/website\/using-phpmailer-to-send-mail-through-php\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.inmotionhosting.com\/support\/website\/using-phpmailer-to-send-mail-through-php\/#primaryimage","url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2022\/02\/PHPMailer-Send-Email-From-PHP.png","contentUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2022\/02\/PHPMailer-Send-Email-From-PHP.png","width":1200,"height":630},{"@type":"BreadcrumbList","@id":"https:\/\/www.inmotionhosting.com\/support\/website\/using-phpmailer-to-send-mail-through-php\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.inmotionhosting.com\/support\/"},{"@type":"ListItem","position":2,"name":"Using PHPMailer to Send Mail through PHP"}]},{"@type":"WebSite","@id":"https:\/\/www.inmotionhosting.com\/support\/#website","url":"https:\/\/www.inmotionhosting.com\/support\/","name":"InMotion Hosting Support Center","description":"Web Hosting Support &amp; Tutorials","publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.inmotionhosting.com\/support\/#organization","name":"InMotion Hosting","url":"https:\/\/www.inmotionhosting.com\/support\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/","url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","contentUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","width":696,"height":696,"caption":"InMotion Hosting"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/inmotionhosting\/","https:\/\/x.com\/InMotionHosting"]},{"@type":"Person","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/c6922c56c84e17079fd558e07b7ef72f","name":"Christopher Maiorana","description":"Christopher Maiorana joined the InMotion community team in 2015 and regularly dispenses tips and tricks in the Support Center, Community Q&A, and the InMotion Hosting Blog.","sameAs":["https:\/\/www.linkedin.com\/in\/chris-m-4623144b\/"],"url":"https:\/\/www.inmotionhosting.com\/support\/author\/christopherm\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"primary_category":{"id":4288,"name":"Website","slug":"website","link":"https:\/\/www.inmotionhosting.com\/support\/website\/"},"_links":{"self":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/676","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/users\/17"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/comments?post=676"}],"version-history":[{"count":20,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/676\/revisions"}],"predecessor-version":[{"id":900431,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/676\/revisions\/900431"}],"wp:attachment":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/media?parent=676"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/categories?post=676"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/tags?post=676"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}