2

Email always going to spam section using codeigniter. I have used codeigniter in aws server It is my library:

CodeIgniter compatible email-library powered by PHPMailer

This is my Controller:

       <?php 
         $this->load->library('email');
         $subject = 'Regitration';
         $message = '<p>Thank you for registering.</p>';
         $body = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
                            <html xmlns="http://www.w3.org/1999/xhtml">
                            <head>
                        <meta http-equiv="Content-Type" content="text/html; charset=' . strtolower(config_item('charset')) . '" />
                            <title>' . html_escape($subject) . '</title>
                            <style type="text/css">
                            body {
                            font-family: Arial, Verdana, Helvetica, sans-serif;
                            font-size: 16px;
                            }
                            </style>
                            </head>
                        <body>
                            ' . $message . '
                            </body>
                            </html>';
                            $result = $this->email->set_header('hello', 'test')
                            ->set_newline("\r\n")
                            ->from('test@gmail.com','test')
                            ->to($this->input->post('jobemail'))
                            ->subject($subject)
                            ->message($body)
                            ->send();
                            ?>

How to solve?

SNS
  • 485
  • 6
  • 20
R.Surya
  • 184
  • 12

0 Answers0