Guest User

Untitled

a guest
May 15th, 2018
289
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. $config = Array(
  2. 'protocol' => 'smtp',
  3. 'smtp_host' => 'ssl://smtp.gmail.com',
  4. 'smtp_port' => '587',
  5. 'smtp_user' => 'mygmailid@gmail.com',
  6. 'smtp_pass' => 'xxxmypassword',
  7. 'mailtype' => 'html',
  8. 'starttls' => true,
  9. 'newline' => "rn"
  10. );
  11. $message = '';
  12. $this->load->library('email', $config);
  13. $this->email->set_newline("rn");
  14. $this->email->initialize($config);
  15. $this->email->from('mygmailid@gmail.com');
  16. $this->email->to('mygmailid@gmail.com');
  17. $this->email->subject('Resume from JobsBuddy for your Job posting');
  18. $this->email->message($message);
  19. if($this->email->send())
  20. {
  21. echo 'Email sent.';
  22. }
  23. else
  24. {
  25. show_error($this->email->print_debugger());
  26. }
Add Comment
Please, Sign In to add comment