title: Codeigniter email - style tag / css not working
body: <p>I am trying to send innerhtml of a particular div to email(in Codeigniter framework).</p>
  
  <p>I got the inner html of the div using jquery and transfered the data to the controller using ajax.</p>
  
  <p>The mail worked, but my problem is html classes, style tags(except the inline styles i wrote in the view file html), style sheet are not working.</p>
  
  <p>Is there any way to add my <code>style.css</code> file in the email content? I will be ok even if the  tag works properly, which I had put at the begining of the <code>&lt;head&gt;</code> section.</p>
  
  <p>Please help, here is my code.</p>
  
  <p><strong>Ajax code for transfering html to controller:</strong> </p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      $(function() {
    $('#sendmail').click(function(e) {
  
          e.preventDefault();
          $.ajax({
                url:'&lt;?php echo site_url();?&gt;/welcome/send',
                type:'POST',
                data:{'message':$('#body').html(),'subject':'Subject of your e-mail'},
                success:function(data) {
                      alert('You data has been successfully e-mailed');
                      alert('Your server-side script said: ' + data);
                }
          });
    });
  });
  
  &lt;/script&gt;
  </code></pre>
  
  <p><strong>Code in the controller</strong>
  public function send()
      {</p>
  
  <pre><code>            $nome = $this-&gt;input-&gt;post('message');
  
             $config = array(
              'protocol' =&gt; 'smtp',
              'smtp_host' =&gt; 'send.one.com',
              'smtp_port' =&gt; '2525',
              'smtp_user' =&gt; 'akhil.ns@cymose-tech.com',
              'smtp_pass' =&gt; 'akhil123',
              'charset' =&gt; 'utf-8',
              'wordwrap' =&gt; TRUE,
              'mailtype' =&gt; 'html'
          );
          $this-&gt;load-&gt;library('email', $config);
  
          $this-&gt;email-&gt;set_newline("\r\n");
          $this-&gt;email-&gt;from('akhil.ns@cymose-tech.com', 'The Wanderers');
          $this-&gt;email-&gt;to('shabasy002@gmail.com');
  
          $this-&gt;email-&gt;subject('The Wanderers Proforma Invoice ');
  
          $formatedMessag ='';
  
      $formatedMessag = '&lt;html&gt;&lt;head&gt;&lt;link rel="stylesheet" type="text/css" href="http://localhost/study/extra/style.css"&gt;&lt;/head&gt;&lt;body&gt;&lt;style type="text/css"&gt;p{color:#cccccc;font-weight:bold;}&lt;/style&gt;';
          $formatedMessag .= $nome.'&lt;/body&gt;&lt;/html&gt;';
  
          $this-&gt;email-&gt;message($formatedMessag);
  
          if ($this-&gt;email-&gt;send()) {
  
              echo $formatedMessag;
  
              }
  
  }
  </code></pre>