Mail is not sending in php

0 votes

My code to send mail from PHP:

 public function send_credentials($beneficiary_user){

  $this->load->library(‘email’);
  $email_config = Array(
        'protocol'  => 'smtp',
        'smtp_host' => 'ssl://smtp.googlemail.com',
        'smtp_port' => '465',
        'smtp_user' => 'app123testing@gmail.com',
        'smtp_pass' => 'apptesting',
        'mailtype'  => 'html',
        'starttls'  => true,
        'newline'   => "\r\n"
    );
    $this->email->from('app123testing@gmail.com', 'invoice');
    $this->email->to('anilapu@navaratan.com');
    $this->email->subject('Invoice');
    $this->email->message('Test');

    $this->email->send();

}

What are the other settings I have to do to make it work *After running echo $this->email->print_debugger();. I got:

Unable to send email using PHP mail(). Your server might not be configured to send mail using this method.

User-Agent: CodeIgniter
     Date: Sun, 9 Feb 2014 14:58:44 +0530
     From: "invoice" 
     Return-Path: 
     Reply-To: "app123testing@gmail.com" 
     X-Sender: app123testing@gmail.com
     X-Mailer: CodeIgniter
     X-Priority: 3 (Normal)
     Message-ID: <52f74a4c41e32@gmail.com>
     Mime-Version: 1.0
     Content-Type: multipart/alternative; boundary="B_ALT_52f74a4c41e88"
      =?utf-8?Q?Invoice?=
      This is a multi-part message in MIME format.
      Your email application may not support this format.
     --B_ALT_52f74a4c41e88
     Content-Type: text/plain; charset=utf-8
     Content-Transfer-Encoding: 8bit
     Test
     --B_ALT_52f74a4c41e88
     Content-Type: text/html; charset=utf-8
     Content-Transfer-Encoding: quoted-printable
    Test
    --B_ALT_52f74a4c41e88--
Jul 28, 2022 in PHP by Kithuzzz
• 38,000 points
812 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In PHP

0 votes
0 answers

PHP is not recognized as an internal or external command in command prompt

I am getting this error when I ...READ MORE

May 7, 2022 in PHP by narikkadan
• 63,600 points
2,088 views
0 votes
0 answers

ErrorDocument 404 /404.php is not working in .htaccess file in PHP

This is the Content of my .htaccess file is: ErrorDocument ...READ MORE

Jun 21, 2022 in PHP by narikkadan
• 63,600 points
840 views
0 votes
1 answer

What is meant by passing the variable by value and reference in PHP?

Hello, When the variable is passed as value ...READ MORE

answered Mar 27, 2020 in PHP by Niroj
• 82,840 points
3,284 views
0 votes
1 answer

What is type casting and type juggling in php?

Hey, The way by which PHP can assign ...READ MORE

answered Mar 27, 2020 in PHP by Niroj
• 82,840 points
7,202 views
0 votes
1 answer

What is the use of $_REQUEST variable in php?

Hii @kartik, The $_REQUEST variable is used to read the ...READ MORE

answered Mar 27, 2020 in PHP by Niroj
• 82,840 points
3,323 views
0 votes
1 answer

SMTP connect() failed PHPmailer - PHP

 You need to add the Host parameter $mail->Host ...READ MORE

answered Feb 16, 2022 in Others by Aditya
• 7,680 points
4,537 views
0 votes
1 answer
0 votes
1 answer

CodeIgniter removing index.php from url

To solve your doubt, use the following ...READ MORE

answered Feb 23, 2022 in PHP by Aditya
• 7,680 points
1,259 views
0 votes
0 answers
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP