Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool(false) 220 smtp.gmail.com ESMTP t8sm1776565pgr.21 - gsmtp
- hello: 250-smtp.gmail.com at your service, [45.116.123.5]
- 250-SIZE 35882577
- 250-8BITMIME
- 250-STARTTLS
- 250-ENHANCEDSTATUSCODES
- 250-PIPELINING
- 250-CHUNKING
- 250 SMTPUTF8
- Failed to send AUTH LOGIN command. Error: 530 5.7.0 Must issue a STARTTLS command first. t8sm1776565pgr.21 - gsmtp
- Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method.
- Date: Fri, 2 Feb 2018 13:02:25 +0530
- To: demo@example.com
- From: "MyWebsite" <demo@example.com>
- Return-Path: <demo@example.com>
- Subject: =?UTF-8?Q?How=20to=20send=20email=20vi?==?UTF-8?Q?a=20SMTP=20?= =?UTF-8?Q?server=20in=20CodeIgniter?=
- Reply-To: <demo@example.com>
- User-Agent: CodeIgniter
- X-Sender: demo@example.com
- X-Mailer: CodeIgniter
- X-Priority: 3 (Normal)
- Message-ID: <5a741409bc741@gmail.com>
- Mime-Version: 1.0
- Content-Type: multipart/alternative; boundary="B_ALT_5a741409bc741"
- This is a multi-part message in MIME format.
- Your email application may not support this format.
- --B_ALT_5a741409bc741
- Content-Type: text/plain; charset=UTF-8
- Content-Transfer-Encoding: 8bit
- Sending email via SMTP serverThis email has sent via SMTP server from
- CodeIgniter application.
- --B_ALT_5a741409bc741
- Content-Type: text/html; charset=UTF-8
- Content-Transfer-Encoding: quoted-printable
- =3Ch1=3ESending email via SMTP server=3C/h1=3E=3Cp=3EThis email has sent vi=
- a SMTP server from CodeIgniter application.=3C/p=3E
- --B_ALT_5a741409bc741--
- bool(false)
- hello: F
- The following SMTP error was encountered: F
- Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method.
- Date: Fri, 2 Feb 2018 13:12:43 +0530
- To: demo@example.com
- From: "MyWebsite" <demo@example.com>
- Return-Path: <demo@example.com>
- Subject: =?UTF-8?Q?How=20to=20send=20email=20vi?==?UTF-8?Q?a=20SMTP=20?= =?UTF-8?Q?server=20in=20CodeIgniter?=
- Reply-To: <demo@example.com>
- User-Agent: CodeIgniter
- X-Sender: demo@example.com
- X-Mailer: CodeIgniter
- X-Priority: 3 (Normal)
- Message-ID: <5a7416736d6ea@gmail.com>
- Mime-Version: 1.0
- Content-Type: multipart/alternative; boundary="B_ALT_5a7416736d6ea"
- This is a multi-part message in MIME format.
- Your email application may not support this format.
- --B_ALT_5a7416736d6ea
- Content-Type: text/plain; charset=UTF-8
- Content-Transfer-Encoding: 8bit
- Sending email via SMTP serverThis email has sent via SMTP server from
- CodeIgniter application.
- --B_ALT_5a7416736d6ea
- Content-Type: text/html; charset=UTF-8
- Content-Transfer-Encoding: quoted-printable
- =3Ch1=3ESending email via SMTP server=3C/h1=3E=3Cp=3EThis email has sent vi=
- a SMTP server from CodeIgniter application.=3C/p=3E
- --B_ALT_5a7416736d6ea--
- $ci = get_instance();
- $ci->load->library('email');
- $config['protocol'] = "smtp";
- $config['smtp_host'] = "mail.google.com";
- $config['smtp_port'] = "26";
- $config['smtp_user'] = "********@gmail.com";
- $config['smtp_pass'] = "************";
- $config['charset'] = "utf-8";
- $config['mailtype'] = "html";
- $config['newline'] = "rn";
- $ci->email->initialize($config);
- $ci->email->from('*********@gmail.com');
- $email_body = "Sending Email from server.";
- $this->email->to($userEmail']);
- $this->email->subject('Email Subject');
- $this->email->message($email_body);
- $email = $this->email->send();
Add Comment
Please, Sign In to add comment