· 8 years ago · May 11, 2018, 02:02 PM
1<?php defined('BASEPATH') OR exit('No direct script access allowed.');
2
3$config['useragent'] = 'PHPMailer'; // Mail engine switcher: 'CodeIgniter' or 'PHPMailer'
4$config['protocol'] = 'smtp'; // 'mail', 'sendmail', or 'smtp'
5$config['mailpath'] = '/usr/sbin/sendmail';
6$config['smtp_host'] = 'smtp.gmail.com';
7$config['smtp_user'] = '***********@gmail.com';
8$config['smtp_pass'] = '*********';
9$config['smtp_port'] = 587;
10$config['smtp_timeout'] = 5; // (in seconds)
11$config['smtp_crypto'] = 'tls'; // '' or 'tls' or 'ssl'
12$config['wordwrap'] = true;
13$config['wrapchars'] = 76;
14$config['mailtype'] = 'html'; // 'text' or 'html'
15$config['charset'] = 'iso-8859-1';
16$config['validate'] = true;
17$config['priority'] = 3; // 1, 2, 3, 4, 5
18$config['crlf'] = "n"; // "rn" or "n" or "r"
19$config['newline'] = "n"; // "rn" or "n" or "r"
20$config['bcc_batch_mode'] = false;
21$config['bcc_batch_size'] = 200;
22
23$this->email->from('rupendrakumardhiman@gmail.com', 'Rupendra');
24 $this->email->to('rupu.engg@gmail.com');
25 $this->email->subject('Notification Mail');
26 $this->email->message('Your message');
27 $this->email->send();
28
29 echo $this->email->print_debugger();
30
31220 smtp.gmail.com ESMTP g20-v6sm6361567pfi.163 - gsmtp
32
33hello: 250-smtp.gmail.com at your service, [160.202.36.237]
34250-SIZE 35882577
35250-8BITMIME
36250-STARTTLS
37250-ENHANCEDSTATUSCODES
38250-PIPELINING
39250-CHUNKING
40250 SMTPUTF8
41
42starttls: 220 2.0.0 Ready to start TLS
43
44hello: 250-smtp.gmail.com at your service, [160.202.36.237]
45250-SIZE 35882577
46250-8BITMIME
47250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH
48250-ENHANCEDSTATUSCODES
49250-PIPELINING
50250-CHUNKING
51250 SMTPUTF8
52
53from: 250 2.1.0 OK g20-v6sm6361567pfi.163 - gsmtp
54
55to: 250 2.1.5 OK g20-v6sm6361567pfi.163 - gsmtp
56
57data: 354 Go ahead g20-v6sm6361567pfi.163 - gsmtp
58
59
60quit:
61
62The following SMTP error was encountered:
63The following SMTP error was encountered:
64Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method.
65
66Date: Fri, 11 May 2018 19:14:55 +0530
67From: "Rupendra" <rupendrakumardhiman@gmail.com>
68Return-Path: <rupendrakumardhiman@gmail.com>
69To: rupu.engg@gmail.com
70Subject: =?ISO-8859-1?Q?=4E=6F=74=69=66=69=63=61=74=69=6F=6E=20=4D=61=69=6C?=
71Reply-To: <rupendrakumardhiman@gmail.com>
72User-Agent: PHPMailer
73X-Sender: rupendrakumardhiman@gmail.com
74X-Mailer: PHPMailer
75X-Priority: 3 (Normal)
76Message-ID: <5af59e575b1d2@gmail.com>
77Mime-Version: 1.0
78
79
80Content-Type: multipart/alternative; boundary="B_ALT_5af59e575b232"
81
82This is a multi-part message in MIME format.
83Your email application may not support this format.
84
85--B_ALT_5af59e575b232
86Content-Type: text/plain; charset=ISO-8859-1
87Content-Transfer-Encoding: 8bit
88
89Your message
90
91
92--B_ALT_5af59e575b232
93Content-Type: text/html; charset=ISO-8859-1
94Content-Transfer-Encoding: quoted-printable
95
96Your message
97
98--B_ALT_5af59e575b232--
99
100Ok