Guest User

Untitled

a guest
Jun 29th, 2018
703
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.79 KB | None | 0 0
  1. $this->load->library('email');
  2.  
  3. $config = array();
  4. $config['protocol'] = 'smtp';
  5. $config['smtp_host'] = 'smtp.zoho.com';
  6. $config['smtp_user'] = 'support@domain.com';
  7. $config['smtp_pass'] = '**************';
  8. $config['smtp_port'] = 465;
  9. $config["smtp_crypto"] = "ssl";
  10.  
  11. $this->email->initialize($config);
  12.  
  13. $this->email->set_newline("rn");
  14. $this->email->from('support@domain.com', 'Support name'); // change it to yours
  15. $this->email->to($to);// change it to yours
  16. $this->email->subject($subject);
  17. $this->email->message($message);
  18.  
  19. if($this->email->send())
  20. {
  21. echo "Success! - An email has been sent to ".$to;
  22. }
  23. else
  24. {
  25. show_error($this->email->print_debugger());
  26. return false;
  27. }
  28. }
  29.  
  30. An Error Was Encountered
  31. 220 mx.zohomail.com SMTP Server ready June 29, 2018 5:16:40 AM PDT
  32.  
  33. hello:
  34.  
  35. The following SMTP error was encountered:
  36. Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method.
  37. Date: Fri, 29 Jun 2018 12:16:40 +0000
  38. From: "Support Name" <support@domain.com>
  39. Return-Path: <support@domain.com>
  40. To: recipent@gmail.com
  41. Subject: =?ISO-8859-1?Q?=43=6F=70=79=20=61=6C=6C=20=74=68=65?=
  42. Reply-To: <support@domain.com>
  43. User-Agent: CodeIgniter
  44. X-Sender: support@domain.com
  45. X-Mailer: CodeIgniter
  46. X-Priority: 3 (Normal)
  47. Message-ID: <5b36232840595@domain.com>
  48. Mime-Version: 1.0
  49.  
  50.  
  51. Content-Type: multipart/alternative; boundary="B_ALT_5b3623284061c"
  52.  
  53. This is a multi-part message in MIME format.
  54. Your email application may not support this format.
  55.  
  56. --B_ALT_5b3623284061c
  57. Content-Type: text/plain; charset=ISO-8859-1
  58. Content-Transfer-Encoding: 8bit
  59.  
  60. Some
  61.  
  62.  
  63. --B_ALT_5b3623284061c
  64. Content-Type: text/html; charset=ISO-8859-1
  65. Content-Transfer-Encoding: quoted-printable
  66.  
  67. Some Email Description=0A=0A Some Email Description
  68.  
  69. --B_ALT_5b3623284061c--
Add Comment
Please, Sign In to add comment