Guest User

Untitled

a guest
Feb 3rd, 2018
340
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.68 KB | None | 0 0
  1. bool(false) 220 smtp.gmail.com ESMTP t8sm1776565pgr.21 - gsmtp
  2. hello: 250-smtp.gmail.com at your service, [45.116.123.5]
  3. 250-SIZE 35882577
  4. 250-8BITMIME
  5. 250-STARTTLS
  6. 250-ENHANCEDSTATUSCODES
  7. 250-PIPELINING
  8. 250-CHUNKING
  9. 250 SMTPUTF8
  10. Failed to send AUTH LOGIN command. Error: 530 5.7.0 Must issue a STARTTLS command first. t8sm1776565pgr.21 - gsmtp
  11. Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method.
  12. Date: Fri, 2 Feb 2018 13:02:25 +0530
  13. To: demo@example.com
  14. From: "MyWebsite" <demo@example.com>
  15. Return-Path: <demo@example.com>
  16. Subject: =?UTF-8?Q?How=20to=20send=20email=20vi?==?UTF-8?Q?a=20SMTP=20?= =?UTF-8?Q?server=20in=20CodeIgniter?=
  17. Reply-To: <demo@example.com>
  18. User-Agent: CodeIgniter
  19. X-Sender: demo@example.com
  20. X-Mailer: CodeIgniter
  21. X-Priority: 3 (Normal)
  22. Message-ID: <5a741409bc741@gmail.com>
  23. Mime-Version: 1.0
  24.  
  25.  
  26. Content-Type: multipart/alternative; boundary="B_ALT_5a741409bc741"
  27.  
  28. This is a multi-part message in MIME format.
  29. Your email application may not support this format.
  30.  
  31. --B_ALT_5a741409bc741
  32. Content-Type: text/plain; charset=UTF-8
  33. Content-Transfer-Encoding: 8bit
  34.  
  35. Sending email via SMTP serverThis email has sent via SMTP server from
  36. CodeIgniter application.
  37.  
  38.  
  39. --B_ALT_5a741409bc741
  40. Content-Type: text/html; charset=UTF-8
  41. Content-Transfer-Encoding: quoted-printable
  42.  
  43. =3Ch1=3ESending email via SMTP server=3C/h1=3E=3Cp=3EThis email has sent vi=
  44. a SMTP server from CodeIgniter application.=3C/p=3E
  45.  
  46. --B_ALT_5a741409bc741--
  47.  
  48. bool(false)
  49. hello: F
  50. The following SMTP error was encountered: F
  51. Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method.
  52. Date: Fri, 2 Feb 2018 13:12:43 +0530
  53. To: demo@example.com
  54. From: "MyWebsite" <demo@example.com>
  55. Return-Path: <demo@example.com>
  56. Subject: =?UTF-8?Q?How=20to=20send=20email=20vi?==?UTF-8?Q?a=20SMTP=20?= =?UTF-8?Q?server=20in=20CodeIgniter?=
  57. Reply-To: <demo@example.com>
  58. User-Agent: CodeIgniter
  59. X-Sender: demo@example.com
  60. X-Mailer: CodeIgniter
  61. X-Priority: 3 (Normal)
  62. Message-ID: <5a7416736d6ea@gmail.com>
  63. Mime-Version: 1.0
  64.  
  65.  
  66. Content-Type: multipart/alternative; boundary="B_ALT_5a7416736d6ea"
  67.  
  68. This is a multi-part message in MIME format.
  69. Your email application may not support this format.
  70.  
  71. --B_ALT_5a7416736d6ea
  72. Content-Type: text/plain; charset=UTF-8
  73. Content-Transfer-Encoding: 8bit
  74.  
  75. Sending email via SMTP serverThis email has sent via SMTP server from
  76. CodeIgniter application.
  77.  
  78.  
  79. --B_ALT_5a7416736d6ea
  80. Content-Type: text/html; charset=UTF-8
  81. Content-Transfer-Encoding: quoted-printable
  82.  
  83. =3Ch1=3ESending email via SMTP server=3C/h1=3E=3Cp=3EThis email has sent vi=
  84. a SMTP server from CodeIgniter application.=3C/p=3E
  85.  
  86. --B_ALT_5a7416736d6ea--
  87.  
  88. $ci = get_instance();
  89. $ci->load->library('email');
  90. $config['protocol'] = "smtp";
  91. $config['smtp_host'] = "mail.google.com";
  92. $config['smtp_port'] = "26";
  93. $config['smtp_user'] = "********@gmail.com";
  94. $config['smtp_pass'] = "************";
  95. $config['charset'] = "utf-8";
  96. $config['mailtype'] = "html";
  97. $config['newline'] = "rn";
  98.  
  99. $ci->email->initialize($config);
  100.  
  101. $ci->email->from('*********@gmail.com');
  102.  
  103. $email_body = "Sending Email from server.";
  104.  
  105. $this->email->to($userEmail']);
  106. $this->email->subject('Email Subject');
  107. $this->email->message($email_body);
  108. $email = $this->email->send();
Add Comment
Please, Sign In to add comment