Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $this->load->library('email');
- $config = array();
- $config['protocol'] = 'smtp';
- $config['smtp_host'] = 'smtp.zoho.com';
- $config['smtp_user'] = 'support@domain.com';
- $config['smtp_pass'] = '**************';
- $config['smtp_port'] = 465;
- $config["smtp_crypto"] = "ssl";
- $this->email->initialize($config);
- $this->email->set_newline("rn");
- $this->email->from('support@domain.com', 'Support name'); // change it to yours
- $this->email->to($to);// change it to yours
- $this->email->subject($subject);
- $this->email->message($message);
- if($this->email->send())
- {
- echo "Success! - An email has been sent to ".$to;
- }
- else
- {
- show_error($this->email->print_debugger());
- return false;
- }
- }
- An Error Was Encountered
- 220 mx.zohomail.com SMTP Server ready June 29, 2018 5:16:40 AM PDT
- hello:
- The following SMTP error was encountered:
- Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method.
- Date: Fri, 29 Jun 2018 12:16:40 +0000
- From: "Support Name" <support@domain.com>
- Return-Path: <support@domain.com>
- To: recipent@gmail.com
- Subject: =?ISO-8859-1?Q?=43=6F=70=79=20=61=6C=6C=20=74=68=65?=
- Reply-To: <support@domain.com>
- User-Agent: CodeIgniter
- X-Sender: support@domain.com
- X-Mailer: CodeIgniter
- X-Priority: 3 (Normal)
- Message-ID: <5b36232840595@domain.com>
- Mime-Version: 1.0
- Content-Type: multipart/alternative; boundary="B_ALT_5b3623284061c"
- This is a multi-part message in MIME format.
- Your email application may not support this format.
- --B_ALT_5b3623284061c
- Content-Type: text/plain; charset=ISO-8859-1
- Content-Transfer-Encoding: 8bit
- Some
- --B_ALT_5b3623284061c
- Content-Type: text/html; charset=ISO-8859-1
- Content-Transfer-Encoding: quoted-printable
- Some Email Description=0A=0A Some Email Description
- --B_ALT_5b3623284061c--
Add Comment
Please, Sign In to add comment