{"id":209,"date":"2014-10-23T18:43:11","date_gmt":"2014-10-23T18:43:11","guid":{"rendered":"https:\/\/www.codexworld.com\/?p=209"},"modified":"2023-02-20T10:40:15","modified_gmt":"2023-02-20T10:40:15","slug":"send-email-with-multiple-attachments-php","status":"publish","type":"post","link":"https:\/\/www.codexworld.com\/send-email-with-multiple-attachments-php\/","title":{"rendered":"Send Email with Multiple Attachments in PHP"},"content":{"rendered":"<p>Sending emails from the script is a very useful functionality for the dynamic web application. The email sending functionality can be easily integrated with PHP. <b>PHP mail()<\/b> function provides a simple way to send emails from the script. You can <a href=\"https:\/\/www.codexworld.com\/send-beautiful-html-email-using-php\/\">send email with text or HTML<\/a> content using the PHP mail() function.<\/p>\n<p>Along with the HTML content, you can send the attachment with the email using PHP. Use some additional headers in the PHP mail() function to send emails with pdf\/image\/word attachments. This tutorial will show you how to <b>send emails with single or multiple attachments in PHP<\/b>.<\/p>\n<p>Our example script helps web developers to send text or HTML emails including any type of file (like image, .doc, .docx, .pdf, .txt, etc.) as an attachment in PHP. To make the whole process simple, we will group the entire code into a function. You can send emails with multiple attachments by calling a single function.<\/p>\n<h2>Send HTML Email with Multiple Attachments<\/h2>\n<p>We&#8217;ll create a custom PHP function and all the code will be grouped in this function for better usability. The <b>multi_attach_mail()<\/b> helps to send email with multiple attachments using PHP.<br \/>\nThe <code>multi_attach_mail()<\/code> function requires the following parameters.<\/p>\n<ul class=\"bullet_disk_list\">\n<li><code>$to<\/code> \u2013 Required. Specify the recipient&#8217;s email address.<\/li>\n<li><code>$subject<\/code> \u2013 Required. Specify email subject.<\/li>\n<li><code>$message<\/code> \u2013 Required. Specify email body content (text or HTML).<\/li>\n<li><code>$senderEmail<\/code> \u2013 Required. Specify the sender&#8217;s email address.<\/li>\n<li><code>$senderName<\/code> \u2013 Required. Specify sender name.<\/li>\n<li><code>$files<\/code> \u2013 Optional. An array of files path to attach with the email.<\/li>\n<\/ul>\n<p>This function returns TRUE on success or FALSE on error.<\/p>\n<pre><span style=\"color: #FF8000\">\/* <br>&nbsp;*&nbsp;Custom&nbsp;PHP&nbsp;function&nbsp;to&nbsp;send&nbsp;an&nbsp;email&nbsp;with&nbsp;multiple&nbsp;attachments <br>&nbsp;*&nbsp;$to&nbsp;Recipient&nbsp;email&nbsp;address <br>&nbsp;*&nbsp;$subject&nbsp;Subject&nbsp;of&nbsp;the&nbsp;email <br>&nbsp;*&nbsp;$message&nbsp;Mail&nbsp;body&nbsp;content <br>&nbsp;*&nbsp;$senderEmail&nbsp;Sender&nbsp;email&nbsp;address <br>&nbsp;*&nbsp;$senderName&nbsp;Sender&nbsp;name <br>&nbsp;*&nbsp;$files&nbsp;Files&nbsp;to&nbsp;attach&nbsp;with&nbsp;the&nbsp;email <br>&nbsp;*\/ <br><\/span><span style=\"color: #007700\">function&nbsp;<\/span><span style=\"color: #0000BB\">multi_attach_mail<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">$to<\/span><span style=\"color: #007700\">,&nbsp;<\/span><span style=\"color: #0000BB\">$subject<\/span><span style=\"color: #007700\">,&nbsp;<\/span><span style=\"color: #0000BB\">$message<\/span><span style=\"color: #007700\">,&nbsp;<\/span><span style=\"color: #0000BB\">$senderEmail<\/span><span style=\"color: #007700\">,&nbsp;<\/span><span style=\"color: #0000BB\">$senderName<\/span><span style=\"color: #007700\">,&nbsp;<\/span><span style=\"color: #0000BB\">$files&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;array()){ <br> &nbsp;&nbsp;&nbsp;<span style=\"color: #FF8000\">\/\/&nbsp;Sender info&nbsp; <\/span><br>&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$from&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #0000BB\">$senderName<\/span><span style=\"color: #007700\">.<\/span><span style=\"color: #DD0000\">\"&nbsp;&lt;\"<\/span><span style=\"color: #007700\">.<\/span><span style=\"color: #0000BB\">$senderEmail<\/span><span style=\"color: #007700\">.<\/span><span style=\"color: #DD0000\">\"&gt;\"<\/span><span style=\"color: #007700\">;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$headers&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #DD0000\">\"From:&nbsp;<\/span><span style=\"color: #0000BB\">$from<\/span><span style=\"color: #DD0000\">\"<\/span><span style=\"color: #007700\">; <br> <br>&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #FF8000\">\/\/&nbsp;Boundary&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$semi_rand&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #0000BB\">md5<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">time<\/span><span style=\"color: #007700\">());&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$mime_boundary&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #DD0000\">\"==Multipart_Boundary_x<\/span><span style=\"color: #007700\">{<\/span><span style=\"color: #0000BB\">$semi_rand<\/span><span style=\"color: #007700\">}<\/span><span style=\"color: #DD0000\">x\"<\/span><span style=\"color: #007700\">;&nbsp; <br> <br>&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #FF8000\">\/\/&nbsp;Headers&nbsp;for&nbsp;attachment&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$headers&nbsp;<\/span><span style=\"color: #007700\">.=&nbsp;<\/span><span style=\"color: #DD0000\">\"\\nMIME-Version:&nbsp;1.0\\n\"&nbsp;<\/span><span style=\"color: #007700\">.&nbsp;<\/span><span style=\"color: #DD0000\">\"Content-Type:&nbsp;multipart\/mixed;\\n\"&nbsp;<\/span><span style=\"color: #007700\">.&nbsp;<\/span><span style=\"color: #DD0000\">\"&nbsp;boundary=\\\"<\/span><span style=\"color: #007700\">{<\/span><span style=\"color: #0000BB\">$mime_boundary<\/span><span style=\"color: #007700\">}<\/span><span style=\"color: #DD0000\">\\\"\"<\/span><span style=\"color: #007700\">;&nbsp; <br> <br>&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #FF8000\">\/\/&nbsp;Multipart&nbsp;boundary&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$message&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #DD0000\">\"--<\/span><span style=\"color: #007700\">{<\/span><span style=\"color: #0000BB\">$mime_boundary<\/span><span style=\"color: #007700\">}<\/span><span style=\"color: #DD0000\">\\n\"&nbsp;<\/span><span style=\"color: #007700\">.&nbsp;<\/span><span style=\"color: #DD0000\">\"Content-Type:&nbsp;text\/html;&nbsp;charset=\\\"UTF-8\\\"\\n\"&nbsp;<\/span><span style=\"color: #007700\">. <br>&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #DD0000\">\"Content-Transfer-Encoding:&nbsp;7bit\\n\\n\"&nbsp;<\/span><span style=\"color: #007700\">.&nbsp;<\/span><span style=\"color: #0000BB\">$message&nbsp;<\/span><span style=\"color: #007700\">.&nbsp;<\/span><span style=\"color: #DD0000\">\"\\n\\n\"<\/span><span style=\"color: #007700\">;&nbsp; <br> <br>&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #FF8000\">\/\/&nbsp;Preparing&nbsp;attachment <br>&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #007700\">if(!empty(<\/span><span style=\"color: #0000BB\">$files<\/span><span style=\"color: #007700\">)){ <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for(<\/span><span style=\"color: #0000BB\">$i<\/span><span style=\"color: #007700\">=<\/span><span style=\"color: #0000BB\">0<\/span><span style=\"color: #007700\">;<\/span><span style=\"color: #0000BB\">$i<\/span><span style=\"color: #007700\">&lt;<\/span><span style=\"color: #0000BB\">count<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">$files<\/span><span style=\"color: #007700\">);<\/span><span style=\"color: #0000BB\">$i<\/span><span style=\"color: #007700\">++){ <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if(<\/span><span style=\"color: #0000BB\">is_file<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">$files<\/span><span style=\"color: #007700\">[<\/span><span style=\"color: #0000BB\">$i<\/span><span style=\"color: #007700\">])){ <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$file_name&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #0000BB\">basename<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">$files<\/span><span style=\"color: #007700\">[<\/span><span style=\"color: #0000BB\">$i<\/span><span style=\"color: #007700\">]); <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$file_size&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #0000BB\">filesize<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">$files<\/span><span style=\"color: #007700\">[<\/span><span style=\"color: #0000BB\">$i<\/span><span style=\"color: #007700\">]); <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$message&nbsp;<\/span><span style=\"color: #007700\">.=&nbsp;<\/span><span style=\"color: #DD0000\">\"--<\/span><span style=\"color: #007700\">{<\/span><span style=\"color: #0000BB\">$mime_boundary<\/span><span style=\"color: #007700\">}<\/span><span style=\"color: #DD0000\">\\n\"<\/span><span style=\"color: #007700\">; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$fp&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;&nbsp;&nbsp;&nbsp;@<\/span><span style=\"color: #0000BB\">fopen<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">$files<\/span><span style=\"color: #007700\">[<\/span><span style=\"color: #0000BB\">$i<\/span><span style=\"color: #007700\">],&nbsp;<\/span><span style=\"color: #DD0000\">\"rb\"<\/span><span style=\"color: #007700\">); <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$data&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;&nbsp;@<\/span><span style=\"color: #0000BB\">fread<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">$fp<\/span><span style=\"color: #007700\">,&nbsp;<\/span><span style=\"color: #0000BB\">$file_size<\/span><span style=\"color: #007700\">); <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;@<\/span><span style=\"color: #0000BB\">fclose<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">$fp<\/span><span style=\"color: #007700\">); <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$data&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #0000BB\">chunk_split<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">base64_encode<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">$data<\/span><span style=\"color: #007700\">)); <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$message&nbsp;<\/span><span style=\"color: #007700\">.=&nbsp;<\/span><span style=\"color: #DD0000\">\"Content-Type:&nbsp;application\/octet-stream;&nbsp;name=\\\"\"<\/span><span style=\"color: #007700\">.<\/span><span style=\"color: #0000BB\">$file_name<\/span><span style=\"color: #007700\">.<\/span><span style=\"color: #DD0000\">\"\\\"\\n\"&nbsp;<\/span><span style=\"color: #007700\">.&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #DD0000\">\"Content-Description:&nbsp;\"<\/span><span style=\"color: #007700\">.<\/span><span style=\"color: #0000BB\">$file_name<\/span><span style=\"color: #007700\">.<\/span><span style=\"color: #DD0000\">\"\\n\"&nbsp;<\/span><span style=\"color: #007700\">. <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #DD0000\">\"Content-Disposition:&nbsp;attachment;\\n\"&nbsp;<\/span><span style=\"color: #007700\">.&nbsp;<\/span><span style=\"color: #DD0000\">\"&nbsp;filename=\\\"\"<\/span><span style=\"color: #007700\">.<\/span><span style=\"color: #0000BB\">$file_name<\/span><span style=\"color: #007700\">.<\/span><span style=\"color: #DD0000\">\"\\\";&nbsp;size=\"<\/span><span style=\"color: #007700\">.<\/span><span style=\"color: #0000BB\">$file_size<\/span><span style=\"color: #007700\">.<\/span><span style=\"color: #DD0000\">\";\\n\"&nbsp;<\/span><span style=\"color: #007700\">.&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #DD0000\">\"Content-Transfer-Encoding:&nbsp;base64\\n\\n\"&nbsp;<\/span><span style=\"color: #007700\">.&nbsp;<\/span><span style=\"color: #0000BB\">$data&nbsp;<\/span><span style=\"color: #007700\">.&nbsp;<\/span><span style=\"color: #DD0000\">\"\\n\\n\"<\/span><span style=\"color: #007700\">; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <br>&nbsp;&nbsp;&nbsp;&nbsp;} <br>&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$message&nbsp;<\/span><span style=\"color: #007700\">.=&nbsp;<\/span><span style=\"color: #DD0000\">\"--<\/span><span style=\"color: #007700\">{<\/span><span style=\"color: #0000BB\">$mime_boundary<\/span><span style=\"color: #007700\">}<\/span><span style=\"color: #DD0000\">--\"<\/span><span style=\"color: #007700\">; <br>&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$returnpath&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #DD0000\">\"-f\"&nbsp;<\/span><span style=\"color: #007700\">.&nbsp;<\/span><span style=\"color: #0000BB\">$senderEmail<\/span><span style=\"color: #007700\">; <br>&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #FF8000\">\/\/&nbsp;Send&nbsp;email <br>&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$mail&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #0000BB\">mail<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">$to<\/span><span style=\"color: #007700\">,&nbsp;<\/span><span style=\"color: #0000BB\">$subject<\/span><span style=\"color: #007700\">,&nbsp;<\/span><span style=\"color: #0000BB\">$message<\/span><span style=\"color: #007700\">,&nbsp;<\/span><span style=\"color: #0000BB\">$headers<\/span><span style=\"color: #007700\">,&nbsp;<\/span><span style=\"color: #0000BB\">$returnpath<\/span><span style=\"color: #007700\">);&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #FF8000\">\/\/&nbsp;Return&nbsp;true&nbsp;if&nbsp;email&nbsp;sent,&nbsp;otherwise&nbsp;return&nbsp;false <br>&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #007700\">if(<\/span><span style=\"color: #0000BB\">$mail<\/span><span style=\"color: #007700\">){ <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;<\/span><span style=\"color: #0000BB\">true<\/span><span style=\"color: #007700\">; <br>&nbsp;&nbsp;&nbsp;&nbsp;}else{ <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;<\/span><span style=\"color: #0000BB\">false<\/span><span style=\"color: #007700\">; <br>&nbsp;&nbsp;&nbsp;&nbsp;} <br>}<\/span><\/pre>\n<h2>Send Email with Multiple Attachment using Custom PHP Function<\/h2>\n<p>The following example shows how you can use our custom PHP function to <b>send email with multiple attachments<\/b>. Call the <code>multi_attach_mail()<\/code> function and pass the required parameters.<\/p>\n<ul class=\"bullet_disk_list\">\n<li><code>$to<\/code> &#8211; Receiver email address.<\/li>\n<li><code>$from<\/code> &#8211; Sender email address.<\/li>\n<li><code>$fromName<\/code> &#8211; Sender name.<\/li>\n<li><code>$subject<\/code> &#8211; Subject of the email.<\/li>\n<li><code>$files<\/code> &#8211; Attachment files path in array format.<\/li>\n<li><code>$htmlContent<\/code> &#8211; Email body content.<\/li>\n<\/ul>\n<pre><span style=\"color: #FF8000\">\/\/&nbsp;Email&nbsp;configuration <br><\/span><span style=\"color: #0000BB\">$to&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #DD0000\">'recipient@example.com'<\/span><span style=\"color: #007700\">; <br><\/span><span style=\"color: #0000BB\">$from&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #DD0000\">'sender@example.com'<\/span><span style=\"color: #007700\">; <br><\/span><span style=\"color: #0000BB\">$fromName&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #DD0000\">'Sender&nbsp;Name'<\/span><span style=\"color: #007700\">; <br> <br><\/span><span style=\"color: #0000BB\">$subject&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #DD0000\">'Send&nbsp;Email&nbsp;with&nbsp;Multiple&nbsp;Attachments&nbsp;in&nbsp;PHP&nbsp;by&nbsp;CodexWorld'<\/span><span style=\"color: #007700\">;&nbsp; <br> <br><\/span><span style=\"color: #FF8000\">\/\/&nbsp;Attachment&nbsp;files <br><\/span><span style=\"color: #0000BB\">$files&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;array( <br>&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #DD0000\">'files\/codex-web-view.png'<\/span><span style=\"color: #007700\">, <br>&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #DD0000\">'files\/codex-site.pdf' <br><\/span><span style=\"color: #007700\">); <br> <br><\/span><span style=\"color: #0000BB\">$htmlContent&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #DD0000\">' <br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;h3&gt;Email&nbsp;with&nbsp;Multiple&nbsp;Attachments&nbsp;by&nbsp;CodexWorld&lt;\/h3&gt; <br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;h4&gt;This&nbsp;HTML&nbsp;email&nbsp;is&nbsp;sent&nbsp;from&nbsp;the&nbsp;script&nbsp;with&nbsp;multiple&nbsp;attachments&nbsp;using&nbsp;PHP.&lt;\/h4&gt; <br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;p&gt;&lt;b&gt;Total&nbsp;Attachments:&lt;\/b&gt;&nbsp;'<\/span><span style=\"color: #007700\">.<\/span><span style=\"color: #0000BB\">count<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">$files<\/span><span style=\"color: #007700\">).<\/span><span style=\"color: #DD0000\">'&lt;\/p&gt;'<\/span><span style=\"color: #007700\">; <br> <br><\/span><span style=\"color: #FF8000\">\/\/&nbsp;Call&nbsp;function&nbsp;and&nbsp;pass&nbsp;the&nbsp;required&nbsp;arguments <br><\/span><span style=\"color: #0000BB\">$sendEmail&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #0000BB\">multi_attach_mail<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">$to<\/span><span style=\"color: #007700\">,&nbsp;<\/span><span style=\"color: #0000BB\">$subject<\/span><span style=\"color: #007700\">,&nbsp;<\/span><span style=\"color: #0000BB\">$htmlContent<\/span><span style=\"color: #007700\">,&nbsp;<\/span><span style=\"color: #0000BB\">$from<\/span><span style=\"color: #007700\">,&nbsp;<\/span><span style=\"color: #0000BB\">$fromName<\/span><span style=\"color: #007700\">,&nbsp;<\/span><span style=\"color: #0000BB\">$files<\/span><span style=\"color: #007700\">); <br> <br><\/span><span style=\"color: #FF8000\">\/\/&nbsp;Email&nbsp;sending&nbsp;status <br><\/span><span style=\"color: #007700\">if(<\/span><span style=\"color: #0000BB\">$sendEmail<\/span><span style=\"color: #007700\">){ <br>&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;<\/span><span style=\"color: #DD0000\">'The&nbsp;email&nbsp;is&nbsp;sent&nbsp;successfully.'<\/span><span style=\"color: #007700\">; <br>}else{ <br>&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;<\/span><span style=\"color: #DD0000\">'Email&nbsp;sending&nbsp;failed!'<\/span><span style=\"color: #007700\">; <br>}<\/span><\/pre>\n<p class=\"seeAlso\"><span><\/span><a href=\"https:\/\/www.codexworld.com\/php-contact-form-send-email-with-attachment-on-submit\/\">Send Email with Attachment on Form Submission using PHP<\/a><\/p>\n<h2>Conclusion<\/h2>\n<p>The email with attachment functionality is very useful when you want to allow the user to submit the form with files and send the form data to an email. Our example script allows you to send any type of file as an attachment with the email from the script. You can also enhance or customize the functionality of multiple email attachments script as per your needs. <b>Download the source code<\/b> to get the email form script with attachments sending functionality.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sending emails from the script is a very useful functionality for the dynamic web application. The email sending functionality can be easily integrated with PHP. PHP mail() function provides a simple way to send emails <\/p>\n","protected":false},"author":1,"featured_media":4102,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[4],"tags":[165,23,24,14],"class_list":["post-209","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-php","tag-attachment","tag-email","tag-html-email","tag-php","cat-4-id","has_thumb"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Send Email with Multiple Attachments in PHP - CodexWorld<\/title>\n<meta name=\"description\" content=\"PHP email with multiple attachments - Simple PHP script for sending text or HTML email with multiple attachments using PHP . Use mail() function to send email with PDF or image attachment in PHP.\" \/>\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.codexworld.com\/send-email-with-multiple-attachments-php\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Send Email with Multiple Attachments in PHP - CodexWorld\" \/>\n<meta property=\"og:description\" content=\"PHP email with multiple attachments - Simple PHP script for sending text or HTML email with multiple attachments using PHP . Use mail() function to send email with PDF or image attachment in PHP.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.codexworld.com\/send-email-with-multiple-attachments-php\/\" \/>\n<meta property=\"og:site_name\" content=\"CodexWorld\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/codexworld\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/codexworld\" \/>\n<meta property=\"article:published_time\" content=\"2014-10-23T18:43:11+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-02-20T10:40:15+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.codexworld.com\/wp-content\/uploads\/2014\/10\/send-email-with-multiple-attachments-in-php-codexworld.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1366\" \/>\n\t<meta property=\"og:image:height\" content=\"768\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"CodexWorld\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@codexworldblog\" \/>\n<meta name=\"twitter:site\" content=\"@codexworldweb\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"CodexWorld\" \/>\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.codexworld.com\\\/send-email-with-multiple-attachments-php\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/send-email-with-multiple-attachments-php\\\/\"},\"author\":{\"name\":\"CodexWorld\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#\\\/schema\\\/person\\\/9da51d8fa3cdefeb5ec9c69136d4baf0\"},\"headline\":\"Send Email with Multiple Attachments in PHP\",\"datePublished\":\"2014-10-23T18:43:11+00:00\",\"dateModified\":\"2023-02-20T10:40:15+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/send-email-with-multiple-attachments-php\\\/\"},\"wordCount\":411,\"commentCount\":20,\"publisher\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/send-email-with-multiple-attachments-php\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2014\\\/10\\\/send-email-with-multiple-attachments-in-php-codexworld.png\",\"keywords\":[\"Attachment\",\"Email\",\"HTML Email\",\"PHP\"],\"articleSection\":[\"PHP\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.codexworld.com\\\/send-email-with-multiple-attachments-php\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/send-email-with-multiple-attachments-php\\\/\",\"url\":\"https:\\\/\\\/www.codexworld.com\\\/send-email-with-multiple-attachments-php\\\/\",\"name\":\"Send Email with Multiple Attachments in PHP - CodexWorld\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/send-email-with-multiple-attachments-php\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/send-email-with-multiple-attachments-php\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2014\\\/10\\\/send-email-with-multiple-attachments-in-php-codexworld.png\",\"datePublished\":\"2014-10-23T18:43:11+00:00\",\"dateModified\":\"2023-02-20T10:40:15+00:00\",\"description\":\"PHP email with multiple attachments - Simple PHP script for sending text or HTML email with multiple attachments using PHP . Use mail() function to send email with PDF or image attachment in PHP.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/send-email-with-multiple-attachments-php\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.codexworld.com\\\/send-email-with-multiple-attachments-php\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/send-email-with-multiple-attachments-php\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2014\\\/10\\\/send-email-with-multiple-attachments-in-php-codexworld.png\",\"contentUrl\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2014\\\/10\\\/send-email-with-multiple-attachments-in-php-codexworld.png\",\"width\":1366,\"height\":768,\"caption\":\"send-email-with-multiple-attachments-in-php-codexworld\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/send-email-with-multiple-attachments-php\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.codexworld.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Send Email with Multiple Attachments in PHP\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#website\",\"url\":\"https:\\\/\\\/www.codexworld.com\\\/\",\"name\":\"CodexWorld\",\"description\":\"Web &amp; Mobile App Development Company\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.codexworld.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#organization\",\"name\":\"CodexWorld\",\"url\":\"https:\\\/\\\/www.codexworld.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2014\\\/09\\\/codexworld-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2014\\\/09\\\/codexworld-logo.png\",\"width\":200,\"height\":19,\"caption\":\"CodexWorld\"},\"image\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/codexworld\",\"https:\\\/\\\/x.com\\\/codexworldweb\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/codexworld\",\"https:\\\/\\\/www.youtube.com\\\/codexworld\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#\\\/schema\\\/person\\\/9da51d8fa3cdefeb5ec9c69136d4baf0\",\"name\":\"CodexWorld\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g\",\"caption\":\"CodexWorld\"},\"description\":\"CodexWorld is a programming blog, one-stop destination for web professionals \u2014 developers, programmers, freelancers, and site owners.\",\"sameAs\":[\"http:\\\/\\\/www.codexworld.com\",\"https:\\\/\\\/www.facebook.com\\\/codexworld\",\"https:\\\/\\\/x.com\\\/codexworldblog\"],\"url\":\"https:\\\/\\\/www.codexworld.com\\\/author\\\/nitya192265\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Send Email with Multiple Attachments in PHP - CodexWorld","description":"PHP email with multiple attachments - Simple PHP script for sending text or HTML email with multiple attachments using PHP . Use mail() function to send email with PDF or image attachment in PHP.","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.codexworld.com\/send-email-with-multiple-attachments-php\/","og_locale":"en_US","og_type":"article","og_title":"Send Email with Multiple Attachments in PHP - CodexWorld","og_description":"PHP email with multiple attachments - Simple PHP script for sending text or HTML email with multiple attachments using PHP . Use mail() function to send email with PDF or image attachment in PHP.","og_url":"https:\/\/www.codexworld.com\/send-email-with-multiple-attachments-php\/","og_site_name":"CodexWorld","article_publisher":"https:\/\/www.facebook.com\/codexworld","article_author":"https:\/\/www.facebook.com\/codexworld","article_published_time":"2014-10-23T18:43:11+00:00","article_modified_time":"2023-02-20T10:40:15+00:00","og_image":[{"width":1366,"height":768,"url":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2014\/10\/send-email-with-multiple-attachments-in-php-codexworld.png","type":"image\/png"}],"author":"CodexWorld","twitter_card":"summary_large_image","twitter_creator":"@codexworldblog","twitter_site":"@codexworldweb","twitter_misc":{"Written by":"CodexWorld","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.codexworld.com\/send-email-with-multiple-attachments-php\/#article","isPartOf":{"@id":"https:\/\/www.codexworld.com\/send-email-with-multiple-attachments-php\/"},"author":{"name":"CodexWorld","@id":"https:\/\/www.codexworld.com\/#\/schema\/person\/9da51d8fa3cdefeb5ec9c69136d4baf0"},"headline":"Send Email with Multiple Attachments in PHP","datePublished":"2014-10-23T18:43:11+00:00","dateModified":"2023-02-20T10:40:15+00:00","mainEntityOfPage":{"@id":"https:\/\/www.codexworld.com\/send-email-with-multiple-attachments-php\/"},"wordCount":411,"commentCount":20,"publisher":{"@id":"https:\/\/www.codexworld.com\/#organization"},"image":{"@id":"https:\/\/www.codexworld.com\/send-email-with-multiple-attachments-php\/#primaryimage"},"thumbnailUrl":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2014\/10\/send-email-with-multiple-attachments-in-php-codexworld.png","keywords":["Attachment","Email","HTML Email","PHP"],"articleSection":["PHP"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.codexworld.com\/send-email-with-multiple-attachments-php\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.codexworld.com\/send-email-with-multiple-attachments-php\/","url":"https:\/\/www.codexworld.com\/send-email-with-multiple-attachments-php\/","name":"Send Email with Multiple Attachments in PHP - CodexWorld","isPartOf":{"@id":"https:\/\/www.codexworld.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.codexworld.com\/send-email-with-multiple-attachments-php\/#primaryimage"},"image":{"@id":"https:\/\/www.codexworld.com\/send-email-with-multiple-attachments-php\/#primaryimage"},"thumbnailUrl":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2014\/10\/send-email-with-multiple-attachments-in-php-codexworld.png","datePublished":"2014-10-23T18:43:11+00:00","dateModified":"2023-02-20T10:40:15+00:00","description":"PHP email with multiple attachments - Simple PHP script for sending text or HTML email with multiple attachments using PHP . Use mail() function to send email with PDF or image attachment in PHP.","breadcrumb":{"@id":"https:\/\/www.codexworld.com\/send-email-with-multiple-attachments-php\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.codexworld.com\/send-email-with-multiple-attachments-php\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codexworld.com\/send-email-with-multiple-attachments-php\/#primaryimage","url":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2014\/10\/send-email-with-multiple-attachments-in-php-codexworld.png","contentUrl":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2014\/10\/send-email-with-multiple-attachments-in-php-codexworld.png","width":1366,"height":768,"caption":"send-email-with-multiple-attachments-in-php-codexworld"},{"@type":"BreadcrumbList","@id":"https:\/\/www.codexworld.com\/send-email-with-multiple-attachments-php\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.codexworld.com\/"},{"@type":"ListItem","position":2,"name":"Send Email with Multiple Attachments in PHP"}]},{"@type":"WebSite","@id":"https:\/\/www.codexworld.com\/#website","url":"https:\/\/www.codexworld.com\/","name":"CodexWorld","description":"Web &amp; Mobile App Development Company","publisher":{"@id":"https:\/\/www.codexworld.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.codexworld.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.codexworld.com\/#organization","name":"CodexWorld","url":"https:\/\/www.codexworld.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codexworld.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2014\/09\/codexworld-logo.png","contentUrl":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2014\/09\/codexworld-logo.png","width":200,"height":19,"caption":"CodexWorld"},"image":{"@id":"https:\/\/www.codexworld.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/codexworld","https:\/\/x.com\/codexworldweb","https:\/\/www.linkedin.com\/company\/codexworld","https:\/\/www.youtube.com\/codexworld"]},{"@type":"Person","@id":"https:\/\/www.codexworld.com\/#\/schema\/person\/9da51d8fa3cdefeb5ec9c69136d4baf0","name":"CodexWorld","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g","caption":"CodexWorld"},"description":"CodexWorld is a programming blog, one-stop destination for web professionals \u2014 developers, programmers, freelancers, and site owners.","sameAs":["http:\/\/www.codexworld.com","https:\/\/www.facebook.com\/codexworld","https:\/\/x.com\/codexworldblog"],"url":"https:\/\/www.codexworld.com\/author\/nitya192265\/"}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2014\/10\/send-email-with-multiple-attachments-in-php-codexworld.png","jetpack_shortlink":"https:\/\/wp.me\/p6bxIh-3n","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/posts\/209","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/comments?post=209"}],"version-history":[{"count":20,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/posts\/209\/revisions"}],"predecessor-version":[{"id":5266,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/posts\/209\/revisions\/5266"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/media\/4102"}],"wp:attachment":[{"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/media?parent=209"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/categories?post=209"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/tags?post=209"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}