Friday, June 6, 2014

send mail using codeigniter

Taste Your Words ... Judge tosses interrogatio...
Taste Your Words ... Judge tosses interrogation in fatal Brevard deputy shooting (Oct. 8, 2013) ...item 2.. 'Rapebait' Fraternity Email Causes Stir (Oct 09, 2013) -- Class stupid @ 'Phi Kappa Tau' ... (Photo credit: marsmet53)
Funny Internet Spam for eMail and Websites is ...
Funny Internet Spam for eMail and Websites is Spicy (Photo credit: epSos.de)
LIFE Magazine (September 27, 1923)  ...item 3....
LIFE Magazine (September 27, 1923) ...item 3.. Is life really fair? -- This is the calculus of unfairness. (October 9, 2011 / 11 Tishrei 5772) ...item 4.. Coping with homework insanity (Posted on Tuesday, 09.18.12) ... (Photo credit: marsmet541)
 
If you want send mail using codeigniter
 on loclahost then you can use the following code for this purpose.
 
 
 
 
 
 
 
 
 
function sendMail()
{
    $config = Array(
  'protocol' => 'smtp',
  'smtp_host' => 'ssl://smtp.googlemail.com',
  'smtp_port' => 465,
  'smtp_user' => 'xxx@gmail.com', // change it to yours
  'smtp_pass' => 'xxx', // change it to yours
  'mailtype' => 'html',
  'charset' => 'iso-8859-1',
  'wordwrap' => TRUE
);

        $message = '';
        $this->load->library('email', $config);
      $this->email->set_newline("\r\n");
      $this->email->from('xxx@gmail.com'); // change it to yours
      $this->email->to('xxx@gmail.com');// change it to yours
      $this->email->subject('Resume from asd for your Job posting');
      $this->email->message($message);
      if($this->email->send())
     {
      echo 'Email sent.';
     }
     else
    {
     show_error($this->email->print_debugger());
    }

}
Enhanced by Zemanta

1 comment:

  1. My friend Suggest me this blog and I can say this is the best blog to get the basic knowledge.Thank you so much for this Selenium Training in Chennai

    ReplyDelete

Related Posts Plugin for WordPress, Blogger...