{"id":1386,"date":"2016-04-08T18:43:35","date_gmt":"2016-04-08T18:43:35","guid":{"rendered":"https:\/\/www.codexworld.com\/?p=1386"},"modified":"2016-04-08T18:43:35","modified_gmt":"2016-04-08T18:43:35","slug":"codeigniter-send-email","status":"publish","type":"post","link":"https:\/\/www.codexworld.com\/codeigniter-send-email\/","title":{"rendered":"Sending Email in CodeIgniter"},"content":{"rendered":"<div class=\"img_center\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.codexworld.com\/wp-content\/uploads\/2016\/04\/sending-email-in-codeigniter-by-codexworld-1024x576.png\" alt=\"sending-email-in-codeigniter-by-codexworld\" width=\"960\" height=\"540\" class=\"alignnone size-large wp-image-1387\" srcset=\"https:\/\/www.codexworld.com\/wp-content\/uploads\/2016\/04\/sending-email-in-codeigniter-by-codexworld-1024x576.png 1024w, https:\/\/www.codexworld.com\/wp-content\/uploads\/2016\/04\/sending-email-in-codeigniter-by-codexworld-300x169.png 300w, https:\/\/www.codexworld.com\/wp-content\/uploads\/2016\/04\/sending-email-in-codeigniter-by-codexworld-768x432.png 768w, https:\/\/www.codexworld.com\/wp-content\/uploads\/2016\/04\/sending-email-in-codeigniter-by-codexworld-350x197.png 350w, https:\/\/www.codexworld.com\/wp-content\/uploads\/2016\/04\/sending-email-in-codeigniter-by-codexworld-320x180.png 320w, https:\/\/www.codexworld.com\/wp-content\/uploads\/2016\/04\/sending-email-in-codeigniter-by-codexworld-380x214.png 380w, https:\/\/www.codexworld.com\/wp-content\/uploads\/2016\/04\/sending-email-in-codeigniter-by-codexworld-200x112.png 200w, https:\/\/www.codexworld.com\/wp-content\/uploads\/2016\/04\/sending-email-in-codeigniter-by-codexworld-346x195.png 346w, https:\/\/www.codexworld.com\/wp-content\/uploads\/2016\/04\/sending-email-in-codeigniter-by-codexworld.png 1366w\" sizes=\"auto, (max-width: 960px) 100vw, 960px\" \/><\/div>\n<p>Sending email in CodeIgniter is much easier and you can set preferences as per your needs. CodeIgniter provides an Email library to sending email in application. CodeIgniter&#8217;s Email class provides the following features.<\/p>\n<ul class=\"bullet_disk_list\">\n<li>Multiple Protocols: Mail, Sendmail, and SMTP<\/li>\n<li>Multiple recipients<\/li>\n<li>CC and BCCs<\/li>\n<li>HTML or Plaintext email<\/li>\n<li>Attachments<\/li>\n<li>Word wrapping<\/li>\n<li>Priorities<\/li>\n<li>BCC Batch Mode, enabling large email lists to be broken into small BCC batches.<\/li>\n<li>Email Debugging tools<\/li>\n<\/ul>\n<p>In this tutorial, we&#8217;ll show the mostly used email features for the web project. Using our sample code you can send a text email, HTML email, and email with an attachment. Also, you would be able to set the cc email address(s) and bcc email address(s).<\/p>\n<p>To send an email in CodeIgniter, you have to load the email library first. Use the following line of code to load the CodeIgniter&#8217;s Email library.<\/p>\n<pre><span style=\"color: #0000BB\">$this<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">load<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">library<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #DD0000\">'email'<\/span><span style=\"color: #007700\">);<\/span><\/pre>\n<h2>Send Text Email:<\/h2>\n<p>Here is an example code to send text email in CodeIgniter.<\/p>\n<pre><span style=\"color: #0000BB\">$this<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">email<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">to<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #DD0000\">'recipient@example.com'<\/span><span style=\"color: #007700\">);<br \/><\/span><span style=\"color: #0000BB\">$this<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">email<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">from<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #DD0000\">'codexworld@gmail.com'<\/span><span style=\"color: #007700\">,<\/span><span style=\"color: #DD0000\">'CodexWorld'<\/span><span style=\"color: #007700\">);<br \/><\/span><span style=\"color: #0000BB\">$this<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">email<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">subject<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #DD0000\">'Test&nbsp;Email&nbsp;(TEXT)'<\/span><span style=\"color: #007700\">);<br \/><\/span><span style=\"color: #0000BB\">$this<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">email<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">message<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #DD0000\">'Text&nbsp;email&nbsp;testing&nbsp;by&nbsp;CodeIgniter&nbsp;Email&nbsp;library.'<\/span><span style=\"color: #007700\">);<br \/><\/span><span style=\"color: #0000BB\">$this<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">email<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">send<\/span><span style=\"color: #007700\">();<\/span><\/pre>\n<h2>Send HTML Email:<\/h2>\n<p>To send an email with HTML content, set a preference (<code>mailtype<\/code>) by passing an array of preference value (<code>html<\/code>) to the email <code>initialize<\/code> function. Here is an example code to send HTML email in CodeIgniter.<\/p>\n<pre><span style=\"color: #0000BB\">$htmlContent&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #DD0000\">'&lt;h1&gt;HTML&nbsp;email&nbsp;testing&nbsp;by&nbsp;CodeIgniter&nbsp;Email&nbsp;Library&lt;\/h1&gt;'<\/span><span style=\"color: #007700\">;<br \/><\/span><span style=\"color: #0000BB\">$htmlContent&nbsp;<\/span><span style=\"color: #007700\">.=&nbsp;<\/span><span style=\"color: #DD0000\">'&lt;p&gt;You&nbsp;can&nbsp;use&nbsp;any&nbsp;HTML&nbsp;tags&nbsp;and&nbsp;content&nbsp;in&nbsp;this&nbsp;email.&lt;\/p&gt;'<\/span><span style=\"color: #007700\">;<br \/>&nbsp;&nbsp;&nbsp;&nbsp;<br \/><\/span><span style=\"color: #0000BB\">$config<\/span><span style=\"color: #007700\">[<\/span><span style=\"color: #DD0000\">'mailtype'<\/span><span style=\"color: #007700\">]&nbsp;=&nbsp;<\/span><span style=\"color: #DD0000\">'html'<\/span><span style=\"color: #007700\">;<br \/><\/span><span style=\"color: #0000BB\">$this<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">email<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">initialize<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">$config<\/span><span style=\"color: #007700\">);<br \/><\/span><span style=\"color: #0000BB\">$this<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">email<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">to<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #DD0000\">'recipient@gmail.com'<\/span><span style=\"color: #007700\">);<br \/><\/span><span style=\"color: #0000BB\">$this<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">email<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">from<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #DD0000\">'codexworld@gmail.com'<\/span><span style=\"color: #007700\">,<\/span><span style=\"color: #DD0000\">'CodexWorld'<\/span><span style=\"color: #007700\">);<br \/><\/span><span style=\"color: #0000BB\">$this<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">email<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">subject<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #DD0000\">'Test&nbsp;Email&nbsp;(HTML)'<\/span><span style=\"color: #007700\">);<br \/><\/span><span style=\"color: #0000BB\">$this<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">email<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">message<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">$htmlContent<\/span><span style=\"color: #007700\">);<br \/><\/span><span style=\"color: #0000BB\">$this<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">email<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">send<\/span><span style=\"color: #007700\">();<\/span><\/pre>\n<h2>Send Email with Attachment:<\/h2>\n<p>Use <code>attach()<\/code> function of Email class to attach files in email. Here is an example code to send an email with attachment in CodeIgniter.<\/p>\n<pre><span style=\"color: #0000BB\">$htmlContent&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #DD0000\">'&lt;h1&gt;HTML&nbsp;email&nbsp;with&nbsp;attachment&nbsp;testing&nbsp;by&nbsp;CodeIgniter&nbsp;Email&nbsp;Library&lt;\/h1&gt;'<\/span><span style=\"color: #007700\">;<br \/><\/span><span style=\"color: #0000BB\">$htmlContent&nbsp;<\/span><span style=\"color: #007700\">.=&nbsp;<\/span><span style=\"color: #DD0000\">'&lt;p&gt;You&nbsp;can&nbsp;attach&nbsp;the&nbsp;files&nbsp;in&nbsp;this&nbsp;email.&lt;\/p&gt;'<\/span><span style=\"color: #007700\">;<br \/><br \/><\/span><span style=\"color: #0000BB\">$config<\/span><span style=\"color: #007700\">[<\/span><span style=\"color: #DD0000\">'mailtype'<\/span><span style=\"color: #007700\">]&nbsp;=&nbsp;<\/span><span style=\"color: #DD0000\">'html'<\/span><span style=\"color: #007700\">;<br \/><\/span><span style=\"color: #0000BB\">$this<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">email<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">initialize<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">$config<\/span><span style=\"color: #007700\">);<br \/><\/span><span style=\"color: #0000BB\">$this<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">email<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">to<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #DD0000\">'recipient@gmail.com'<\/span><span style=\"color: #007700\">);<br \/><\/span><span style=\"color: #0000BB\">$this<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">email<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">from<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #DD0000\">'codexworld@gmail.com'<\/span><span style=\"color: #007700\">,<\/span><span style=\"color: #DD0000\">'CodexWorld'<\/span><span style=\"color: #007700\">);<br \/><\/span><span style=\"color: #0000BB\">$this<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">email<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">subject<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #DD0000\">'Test&nbsp;Email&nbsp;(Attachment)'<\/span><span style=\"color: #007700\">);<br \/><\/span><span style=\"color: #0000BB\">$this<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">email<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">message<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">$htmlContent<\/span><span style=\"color: #007700\">);<br \/><\/span><span style=\"color: #0000BB\">$this<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">email<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">attach<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #DD0000\">'files\/attachment.pdf'<\/span><span style=\"color: #007700\">);<br \/><\/span><span style=\"color: #0000BB\">$this<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">email<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">send<\/span><span style=\"color: #007700\">();<\/span><\/pre>\n<h2>Send Email to Multiple Recipient(s):<\/h2>\n<p>Using <code>to()<\/code> function of Email class, you can send email to single or multiple recipient(s). Provide single email, comma-delimited list or an array.<\/p>\n<pre><span style=\"color: #0000BB\">$this<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">email<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">to<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #DD0000\">'one@example.com'<\/span><span style=\"color: #007700\">);<\/span><\/pre>\n<p><b>OR<\/b><\/p>\n<pre><span style=\"color: #0000BB\">$this<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">email<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">to<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #DD0000\">'one@example.com,&nbsp;two@example.com,&nbsp;three@example.com'<\/span><span style=\"color: #007700\">);<\/span><\/pre>\n<p><b>OR<\/b><\/p>\n<pre><span style=\"color: #0000BB\">$recipientArr&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;array(<\/span><span style=\"color: #DD0000\">'one@example.com'<\/span><span style=\"color: #007700\">,&nbsp;<\/span><span style=\"color: #DD0000\">'two@example.com'<\/span><span style=\"color: #007700\">,&nbsp;<\/span><span style=\"color: #DD0000\">'three@example.com'<\/span><span style=\"color: #007700\">);<br \/><\/span><span style=\"color: #0000BB\">$this<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">email<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">to<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">$recipientArr<\/span><span style=\"color: #007700\">);<\/span><\/pre>\n<h2>Sets the CC and BCC Email Address(s):<\/h2>\n<p>Just like <code>to()<\/code>, you can provide single email, comma-delimited list or an array in <code>cc()<\/code> and <code>bcc()<\/code>.<\/p>\n<pre><span style=\"color: #0000BB\">$this<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">email<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">cc<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #DD0000\">'another@example.com'<\/span><span style=\"color: #007700\">);<\/span><\/pre>\n<pre><span style=\"color: #0000BB\">$this<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">email<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">bcc<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #DD0000\">'another@example.com'<\/span><span style=\"color: #007700\">);<\/span><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Sending email in CodeIgniter is much easier and you can set preferences as per your needs. CodeIgniter provides an Email library to sending email in application. CodeIgniter&#8217;s Email class provides the following features. Multiple Protocols: <\/p>\n","protected":false},"author":1,"featured_media":1387,"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":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[8],"tags":[165,55,23,24,166],"class_list":["post-1386","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-codeigniter","tag-attachment","tag-codeigniter","tag-email","tag-html-email","tag-library","cat-8-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>Sending Email in CodeIgniter - CodexWorld<\/title>\n<meta name=\"description\" content=\"Sending Email using CodeIgniter Email library. Example code to send a text email, HTML email, and email with an attachment in CodeIgniter.\" \/>\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\/codeigniter-send-email\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Sending Email in CodeIgniter - CodexWorld\" \/>\n<meta property=\"og:description\" content=\"Sending Email using CodeIgniter Email library. Example code to send a text email, HTML email, and email with an attachment in CodeIgniter.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.codexworld.com\/codeigniter-send-email\/\" \/>\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=\"2016-04-08T18:43:35+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.codexworld.com\/wp-content\/uploads\/2016\/04\/sending-email-in-codeigniter-by-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=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/codeigniter-send-email\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/codeigniter-send-email\\\/\"},\"author\":{\"name\":\"CodexWorld\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#\\\/schema\\\/person\\\/9da51d8fa3cdefeb5ec9c69136d4baf0\"},\"headline\":\"Sending Email in CodeIgniter\",\"datePublished\":\"2016-04-08T18:43:35+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/codeigniter-send-email\\\/\"},\"wordCount\":279,\"commentCount\":4,\"publisher\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/codeigniter-send-email\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2016\\\/04\\\/sending-email-in-codeigniter-by-codexworld.png\",\"keywords\":[\"Attachment\",\"CodeIgniter\",\"Email\",\"HTML Email\",\"Library\"],\"articleSection\":[\"CodeIgniter\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.codexworld.com\\\/codeigniter-send-email\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/codeigniter-send-email\\\/\",\"url\":\"https:\\\/\\\/www.codexworld.com\\\/codeigniter-send-email\\\/\",\"name\":\"Sending Email in CodeIgniter - CodexWorld\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/codeigniter-send-email\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/codeigniter-send-email\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2016\\\/04\\\/sending-email-in-codeigniter-by-codexworld.png\",\"datePublished\":\"2016-04-08T18:43:35+00:00\",\"description\":\"Sending Email using CodeIgniter Email library. Example code to send a text email, HTML email, and email with an attachment in CodeIgniter.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/codeigniter-send-email\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.codexworld.com\\\/codeigniter-send-email\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/codeigniter-send-email\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2016\\\/04\\\/sending-email-in-codeigniter-by-codexworld.png\",\"contentUrl\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2016\\\/04\\\/sending-email-in-codeigniter-by-codexworld.png\",\"width\":1366,\"height\":768,\"caption\":\"sending-email-in-codeigniter-by-codexworld\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/codeigniter-send-email\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.codexworld.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Sending Email in CodeIgniter\"}]},{\"@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":"Sending Email in CodeIgniter - CodexWorld","description":"Sending Email using CodeIgniter Email library. Example code to send a text email, HTML email, and email with an attachment in CodeIgniter.","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\/codeigniter-send-email\/","og_locale":"en_US","og_type":"article","og_title":"Sending Email in CodeIgniter - CodexWorld","og_description":"Sending Email using CodeIgniter Email library. Example code to send a text email, HTML email, and email with an attachment in CodeIgniter.","og_url":"https:\/\/www.codexworld.com\/codeigniter-send-email\/","og_site_name":"CodexWorld","article_publisher":"https:\/\/www.facebook.com\/codexworld","article_author":"https:\/\/www.facebook.com\/codexworld","article_published_time":"2016-04-08T18:43:35+00:00","og_image":[{"width":1366,"height":768,"url":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2016\/04\/sending-email-in-codeigniter-by-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":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.codexworld.com\/codeigniter-send-email\/#article","isPartOf":{"@id":"https:\/\/www.codexworld.com\/codeigniter-send-email\/"},"author":{"name":"CodexWorld","@id":"https:\/\/www.codexworld.com\/#\/schema\/person\/9da51d8fa3cdefeb5ec9c69136d4baf0"},"headline":"Sending Email in CodeIgniter","datePublished":"2016-04-08T18:43:35+00:00","mainEntityOfPage":{"@id":"https:\/\/www.codexworld.com\/codeigniter-send-email\/"},"wordCount":279,"commentCount":4,"publisher":{"@id":"https:\/\/www.codexworld.com\/#organization"},"image":{"@id":"https:\/\/www.codexworld.com\/codeigniter-send-email\/#primaryimage"},"thumbnailUrl":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2016\/04\/sending-email-in-codeigniter-by-codexworld.png","keywords":["Attachment","CodeIgniter","Email","HTML Email","Library"],"articleSection":["CodeIgniter"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.codexworld.com\/codeigniter-send-email\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.codexworld.com\/codeigniter-send-email\/","url":"https:\/\/www.codexworld.com\/codeigniter-send-email\/","name":"Sending Email in CodeIgniter - CodexWorld","isPartOf":{"@id":"https:\/\/www.codexworld.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.codexworld.com\/codeigniter-send-email\/#primaryimage"},"image":{"@id":"https:\/\/www.codexworld.com\/codeigniter-send-email\/#primaryimage"},"thumbnailUrl":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2016\/04\/sending-email-in-codeigniter-by-codexworld.png","datePublished":"2016-04-08T18:43:35+00:00","description":"Sending Email using CodeIgniter Email library. Example code to send a text email, HTML email, and email with an attachment in CodeIgniter.","breadcrumb":{"@id":"https:\/\/www.codexworld.com\/codeigniter-send-email\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.codexworld.com\/codeigniter-send-email\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codexworld.com\/codeigniter-send-email\/#primaryimage","url":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2016\/04\/sending-email-in-codeigniter-by-codexworld.png","contentUrl":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2016\/04\/sending-email-in-codeigniter-by-codexworld.png","width":1366,"height":768,"caption":"sending-email-in-codeigniter-by-codexworld"},{"@type":"BreadcrumbList","@id":"https:\/\/www.codexworld.com\/codeigniter-send-email\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.codexworld.com\/"},{"@type":"ListItem","position":2,"name":"Sending Email in CodeIgniter"}]},{"@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\/2016\/04\/sending-email-in-codeigniter-by-codexworld.png","jetpack_shortlink":"https:\/\/wp.me\/p6bxIh-mm","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/posts\/1386","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=1386"}],"version-history":[{"count":1,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/posts\/1386\/revisions"}],"predecessor-version":[{"id":1388,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/posts\/1386\/revisions\/1388"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/media\/1387"}],"wp:attachment":[{"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/media?parent=1386"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/categories?post=1386"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/tags?post=1386"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}