0

Now, there is one problem. There is no error message:

Your message has been sent, we will get back to your shortly.
PLEASE COMPLETE THE FOLLOWING REGISTRATION PROGRESS!

An email has been sent to your inbox. Please check your email to continue.

registration2.php

<!DOCTYPE html>
<html lang="en">
<head>
    <title>Registration</title>
    <meta charset="utf-8">
    <meta name="description" content="Your description">
    <meta name="keywords" content="Your keywords">
    <meta name="author" content="Your name">
    <link rel="stylesheet" href="css/style.css">
    <script src="js/jquery-1.7.1.min.js"></script>
    <script src="js/script.js"></script>
    <script type="text/javascript">
        $(document).ready(function() {
            $("#login").click(function() {
                $(".login_box").slideToggle('fast');
            });
        }); 
    </script>
    <script type="text/javascript">
        function myFunction()
        {
        document.getElementById('login_box').style.display='none';
        }
    </script>
<!--[if lt IE 8]>
   <div style=' clear: both; text-align:center; position: relative;'>
     <a href="http://windows.microsoft.com/en-US/internet-explorer/products/ie/home?ocid=ie6_countdown_bannercode">
       <img src="http://storage.ie6countdown.com/assets/100/images/banners/warning_bar_0000_us.jpg" border="0" height="42" width="820" alt="You are using an outdated browser. For a faster, safer browsing experience, upgrade for free today." />
    </a>
  </div>
<![endif]-->
<!--[if lt IE 9]>
    <script src="js/html5.js"></script>
    <link rel="stylesheet" href="css/ie.css"> 
<![endif]-->
</head>
<body>

<?php include('menu.php'); ?>

<div class="bg-main" onClick="myFunctionDisplayNone()">
    <header>
        <div class="container_24">
            <div class="wrapper">                        
                <br><br>                          
            </div><br><br>         

<?php

include('includes/koneksi.php');


// PHP Mailer 

require $_SERVER['DOCUMENT_ROOT'] . '/phpmailer/PHPMailerAutoload.php'; //memanggil library php mailernya


function smtpmailer($to, $from, $from_name, $subject, $body) {

global $error;

$mail = new PHPMailer();

$mail->AuthType = 'NTLM';

$mail->IsSMTP();

$mail->SMTPDebug = 2;  // untuk memunculkan pesan error /debug di layar

$mail->SMTPAuth = true;  // authentifikasi smtp enable atau disable

$mail->SMTPSecure = "";//‘ssl atau di kosongkas jika none’; // secure transfer membutuhkan authentifikasi dari mail server

$mail->Host ="smtp.indonusa.net.id"; // masukkan nama host email “diawal ssl://”

$mail->Port = 25; //port secure ssl email

$mail->Username = "davy@indonusa.net.id"; //username email

$mail->Password = "*********"; //password email

$mail->SetFrom($from, $from_name);

$mail->Subject = $subject;

$mail->Body = $body;

$mail->AddAddress($to);

if(!$mail->Send()) {

$error = "Mail error: ".$mail->ErrorInfo;

return false;

} else {

$error = "Message sent!";

return true;

}

}


// write program to send email to the recorded email address

    /*
    require_once('recaptchalib.php');
    $name = strip_tags(@$_POST['name']);
    $email = str_replace(" ", "", strip_tags(@$_POST['email']));
    $phone = str_replace(" ", "", strip_tags(@$_POST['phone']));
    $message = strip_tags(@$_POST['message']); */
    $name = "John";
    $email = "davy@indonusa.net.id";
    $phone = "8888888";
    $message = "message";
    /*if (@$_POST['submit']) {*/
    if ($name&&$email&&$phone&&$message) {
    if (is_numeric($phone)) {
    /*$privatekey = "6LfjvdcSAAAAAHNcKjYO5DhTNefxYZHYcfhtrvGC";
    $resp = recaptcha_check_answer($privatekey,
    $_SERVER["REMOTE_ADDR"],
    $_POST["recaptcha_challenge_field"],
    $_POST["recaptcha_response_field"]);
    if (!$resp->is_valid) {
    //What happens when the CAPTCHA was entered incorrectly
    echo "The reCAPTCHA wasn't entered correctly.";
    } else { */
    //Your code here to handle a successful verification
    ini_set("SMTP", "smtp.indonusa.net.id");
    $body = "
    Name: ".$name."
    Phone: ".$phone."
    Email: ".$email."\n\n
    ".$message;
    //mail("davy@indonusa.net.id", "Message from Innovation Website", $body, "From: ".$email
    smtpmailer("davy@indonusa.net.id", "davy@indonusa.net.id", "Davy", "Test Email", $body); // script kirim email

    echo "Your message has been sent, we will get back to your shortly.";
    $name = trim("");
    $email = trim("");
    $phone = trim("");
    $message = trim("");
    }
    }
    else
    echo "There should only be numbers in your phone number.";
    /*} */
    /*else
    echo "Please fill in <b>all</b> the fields!";
    } */

?>          

<h3>PLEASE COMPLETE THE FOLLOWING REGISTRATION PROGRESS!</h3><br><br>

<form id="registration-form">

<table style="width: 1000px">

<img src="images/registrationbar2.png" height="70px" width="850px"><br><br><br>

<tr>
    <img src="images/email.png" width="50px">&nbsp;&nbsp;An email has been sent to your inbox.  Please check your email to continue.<br><br><br>
</tr>


</table>       


</form>

</div>

<?php include('footer.php'); ?>

</body>
</html>

Yet, whenever I check my email I do not receive any email! I wonder why?

0

Set:

$mail->SMTPDebug = 4;

It should return a verbose output of the telnet session. If it does not help you to find the error, paste the result here. By the way, you can remove this line:

ini_set("SMTP", "smtp.indonusa.net.id");

It does not affect PHPMailer.

0

Here is the message:

2014-08-24 17:28:33 Connection: opening to smtp.indonusa.net.id:25, t=10, opt=array ( ) 2014-08-24 17:28:33 Connection: opened 2014-08-24 17:28:33 SMTP -> get_lines(): $data was "" 2014-08-24 17:28:33 SMTP -> get_lines(): $str is "220 EHUB3.idcloud.biz Microsoft ESMTP MAIL Service ready at Mon, 25 Aug 2014 00:28:36 +0700 " 2014-08-24 17:28:33 SMTP -> get_lines(): $data is "220 EHUB3.idcloud.biz Microsoft ESMTP MAIL Service ready at Mon, 25 Aug 2014 00:28:36 +0700 " 2014-08-24 17:28:33 SERVER -> CLIENT: 220 EHUB3.idcloud.biz Microsoft ESMTP MAIL Service ready at Mon, 25 Aug 2014 00:28:36 +0700 2014-08-24 17:28:33 CLIENT -> SERVER: EHLO 202.93.143.156 2014-08-24 17:28:33 SMTP -> get_lines(): $data was "" 2014-08-24 17:28:33 SMTP -> get_lines(): $str is "250-EHUB3.idcloud.biz Hello [202.93.143.156] " 2014-08-24 17:28:33 SMTP -> get_lines(): $data is "250-EHUB3.idcloud.biz Hello [202.93.143.156] " 2014-08-24 17:28:33 SMTP -> get_lines(): $data was "250-EHUB3.idcloud.biz Hello [202.93.143.156] " 2014-08-24 17:28:33 SMTP -> get_lines(): $str is "250-SIZE 30720000 " 2014-08-24 17:28:33 SMTP -> get_lines(): $data is "250-EHUB3.idcloud.biz Hello [202.93.143.156] 250-SIZE 30720000 " 2014-08-24 17:28:33 SMTP -> get_lines(): $data was "250-EHUB3.idcloud.biz Hello [202.93.143.156] 250-SIZE 30720000 " 2014-08-24 17:28:33 SMTP -> get_lines(): $str is "250-PIPELINING " 2014-08-24 17:28:33 SMTP -> get_lines(): $data is "250-EHUB3.idcloud.biz Hello [202.93.143.156] 250-SIZE 30720000 250-PIPELINING " 2014-08-24 17:28:33 SMTP -> get_lines(): $data was "250-EHUB3.idcloud.biz Hello [202.93.143.156] 250-SIZE 30720000 250-PIPELINING " 2014-08-24 17:28:33 SMTP -> get_lines(): $str is "250-DSN " 2014-08-24 17:28:33 SMTP -> get_lines(): $data is "250-EHUB3.idcloud.biz Hello [202.93.143.156] 250-SIZE 30720000 250-PIPELINING 250-DSN " 2014-08-24 17:28:33 SMTP -> get_lines(): $data was "250-EHUB3.idcloud.biz Hello [202.93.143.156] 250-SIZE 30720000 250-PIPELINING 250-DSN " 2014-08-24 17:28:33 SMTP -> get_lines(): $str is "250-ENHANCEDSTATUSCODES " 2014-08-24 17:28:33 SMTP -> get_lines(): $data is "250-EHUB3.idcloud.biz Hello [202.93.143.156] 250-SIZE 30720000 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES " 2014-08-24 17:28:33 SMTP -> get_lines(): $data was "250-EHUB3.idcloud.biz Hello [202.93.143.156] 250-SIZE 30720000 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES " 2014-08-24 17:28:33 SMTP -> get_lines(): $str is "250-STARTTLS " 2014-08-24 17:28:33 SMTP -> get_lines(): $data is "250-EHUB3.idcloud.biz Hello [202.93.143.156] 250-SIZE 30720000 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-STARTTLS " 2014-08-24 17:28:33 SMTP -> get_lines(): $data was "250-EHUB3.idcloud.biz Hello [202.93.143.156] 250-SIZE 30720000 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-STARTTLS " 2014-08-24 17:28:33 SMTP -> get_lines(): $str is "250-AUTH " 2014-08-24 17:28:33 SMTP -> get_lines(): $data is "250-EHUB3.idcloud.biz Hello [202.93.143.156] 250-SIZE 30720000 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-STARTTLS 250-AUTH " 2014-08-24 17:28:33 SMTP -> get_lines(): $data was "250-EHUB3.idcloud.biz Hello [202.93.143.156] 250-SIZE 30720000 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-STARTTLS 250-AUTH " 2014-08-24 17:28:33 SMTP -> get_lines(): $str is "250-8BITMIME " 2014-08-24 17:28:33 SMTP -> get_lines(): $data is "250-EHUB3.idcloud.biz Hello [202.93.143.156] 250-SIZE 30720000 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-STARTTLS 250-AUTH 250-8BITMIME " 2014-08-24 17:28:33 SMTP -> get_lines(): $data was "250-EHUB3.idcloud.biz Hello [202.93.143.156] 250-SIZE 30720000 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-STARTTLS 250-AUTH 250-8BITMIME " 2014-08-24 17:28:33 SMTP -> get_lines(): $str is "250-BINARYMIME " 2014-08-24 17:28:33 SMTP -> get_lines(): $data is "250-EHUB3.idcloud.biz Hello [202.93.143.156] 250-SIZE 30720000 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-STARTTLS 250-AUTH 250-8BITMIME 250-BINARYMIME " 2014-08-24 17:28:33 SMTP -> get_lines(): $data was "250-EHUB3.idcloud.biz Hello [202.93.143.156] 250-SIZE 30720000 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-STARTTLS 250-AUTH 250-8BITMIME 250-BINARYMIME " 2014-08-24 17:28:33 SMTP -> get_lines(): $str is "250 CHUNKING " 2014-08-24 17:28:33 SMTP -> get_lines(): $data is "250-EHUB3.idcloud.biz Hello [202.93.143.156] 250-SIZE 30720000 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-STARTTLS 250-AUTH 250-8BITMIME 250-BINARYMIME 250 CHUNKING " 2014-08-24 17:28:33 SERVER -> CLIENT: 250-EHUB3.idcloud.biz Hello [202.93.143.156] 250-SIZE 30720000 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-STARTTLS 250-AUTH 250-8BITMIME 250-BINARYMIME 250 CHUNKING 2014-08-24 17:28:33 CLIENT -> SERVER: AUTH NTLM TlRMTVNTUAABAAAABzIAAAAAAAAgAAAAAAAAACAAAAA= 2014-08-24 17:28:38 SMTP -> get_lines(): $data was "" 2014-08-24 17:28:38 SMTP -> get_lines(): $str is "504 5.7.4 Unrecognized authentication type " 2014-08-24 17:28:38 SMTP -> get_lines(): $data is "504 5.7.4 Unrecognized authentication type " 2014-08-24 17:28:38 SERVER -> CLIENT: 504 5.7.4 Unrecognized authentication type 2014-08-24 17:28:38 SMTP ERROR: AUTH NTLM command failed: 504 5.7.4 Unrecognized authentication type 2014-08-24 17:28:38 CLIENT -> SERVER: QUIT 2014-08-24 17:28:38 SMTP -> get_lines(): $data was "" 2014-08-24 17:28:38 SMTP -> get_lines(): $str is "221 2.0.0 Service closing transmission channel " 2014-08-24 17:28:38 SMTP -> get_lines(): $data is "221 2.0.0 Service closing transmission channel " 2014-08-24 17:28:38 SERVER -> CLIENT: 221 2.0.0 Service closing transmission channel 2014-08-24 17:28:38 Connection: closed 2014-08-24 17:28:38 SMTP connect() failed. Your message has been sent, we will get back to your shortly.
PLEASE COMPLETE THE FOLLOWING REGISTRATION PROGRESS!

0

Ok, the last part of the log explains the problem:

2014-08-24 17:28:33 CLIENT -> SERVER: AUTH NTLM TlRMTVNTUAABAAAABzIAAAAAAAAgAAAAAAAAACAAAAA=
2014-08-24 17:28:38 SMTP -> get_lines(): $data was ""
2014-08-24 17:28:38 SMTP -> get_lines(): $str is "504 5.7.4 Unrecognized authentication type "
2014-08-24 17:28:38 SMTP -> get_lines(): $data is "504 5.7.4 Unrecognized authentication type "
2014-08-24 17:28:38 SERVER -> CLIENT: 504 5.7.4 Unrecognized authentication type
2014-08-24 17:28:38 SMTP ERROR: AUTH NTLM command failed: 504 5.7.4 Unrecognized authentication type
2014-08-24 17:28:38 CLIENT -> SERVER: QUIT
2014-08-24 17:28:38 SMTP -> get_lines(): $data was ""
2014-08-24 17:28:38 SMTP -> get_lines(): $str is "221 2.0.0 Service closing transmission channel "
2014-08-24 17:28:38 SMTP -> get_lines(): $data is "221 2.0.0 Service closing transmission channel "
2014-08-24 17:28:38 SERVER -> CLIENT: 221 2.0.0 Service closing transmission channel
2014-08-24 17:28:38 Connection: closed
2014-08-24 17:28:38 SMTP connect() failed.

The authentication failed because it doesn't recognize the type. The error is defined by the number, which is 504. In one of your previous posts you wrote that you got errors also from the others authentication methods, but these where of the same type or the error code was different?

Anyway to be sure, you must check the documentation of your mail server or ask to the admin.

0

smtp.indonusa.net.id - required username / password - I am having a hard time connect to it.

smtp2.indonusa.net.id - no username / password - being block by the IT infrastructure

Then I should try using gmail

And I am having similar authentication error.

SMTP ERROR: AUTH NTLM command failed

What authentication works for gmail?

I even try to comment out the: $mail->AuthType = 'NTLM';

SMTP ERROR: AUTH command failed

Edited by davy_yg

1

There are a lot of examples in this forum already with PhpMailer and Gmail, do a search. IIRC Gmail uses TLS on port 587.

1

@pritaeas
Whoops, I didn't saw your reply!

With Gmail you can use AUTH LOGIN, but you need an application-specific password before you can go further, read this:

Then generate the password from here:

And then embed this password in your script, as example:

<?php

    require './PHPMailerAutoload.php';

    $mail = new PHPMailer;

    $mail->isSMTP();
    $mail->SMTPDebug = 2;
    $mail->SMTPAuth = TRUE;
    $mail->Host     = 'ssl://smtp.gmail.com:465;tls://smtp.gmail.com:587';
    $mail->Username = '*******@gmail.com';
    $mail->Password = '*******';

    $mail->From = '*******@gmail.com'; # it must be the username
    $mail->FromName = 'Your Name';
    $mail->WordWrap = 50;

    # to
    $mail->addAddress('*******@domain.tld', 'Name and Surname');

    $mail->Subject  = 'Test';
    $mail->Body     = 'Hello World';

    echo ! $mail->send() ? 'Error: ' . $mail->ErrorInfo : 'Success!';

More information about Gmail SMTP here:

Edited by cereal

Votes + Comments
Thanks. Don't use it often enough to know it has changed.
0

ok, I fix my code. This time I get a strange error message:

Warning: require(C:/xampp/htdocs/phpmailer/PHPMailerAutoload.php): failed to open stream: No such file or directory in C:\xampp\htdocs\squprime\registration2.php on line 56

Fatal error: require(): Failed opening required 'C:/xampp/htdocs/phpmailer/PHPMailerAutoload.php' (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\squprime\registration2.php on line 56

line 56: require $_SERVER['DOCUMENT_ROOT'] . '/phpmailer/PHPMailerAutoload.php'; //memanggil library php mailernya

I already check that I have a file name in:

C:\xampp\htdocs\phpmailer\PHPMailerAutoload.php

0

Hey, I wonder what's the setting for SMTP so that it won't show that long smtp message any longer?

$mail->SMTPDebug = 2;
0

okay, now I already able to receive email to gmail.

Now, another problem is how to make the user who fill-in the registration form receive email in their email address?

I have the user email in my sql database which I retrieve anytime, I just do not know how to code so that each user with different email can receive email in their mail box.

for example, the following code allow the email to be sent to my email instead of the user email. I think I could like to be able to do both. Each with different email type to my mail box (email1) to the user mail box (email2) for example.

registration5.php

<!DOCTYPE html>
<html lang="en">
<head>
    <title>Registration</title>
    <meta charset="utf-8">
    <meta name="description" content="Your description">
    <meta name="keywords" content="Your keywords">
    <meta name="author" content="Your name">
    <link rel="stylesheet" href="css/style.css">
    <script src="js/jquery-1.7.1.min.js"></script>
    <script src="js/script.js"></script>
    <script type="text/javascript">
        $(document).ready(function() {
            $("#login").click(function() {
                $(".login_box").slideToggle('fast');
            });
        }); 
    </script>
    <script type="text/javascript">
        function myFunction()
        {
        document.getElementById('login_box').style.display='none';
        }
    </script>
<!--[if lt IE 8]>
   <div style=' clear: both; text-align:center; position: relative;'>
     <a href="http://windows.microsoft.com/en-US/internet-explorer/products/ie/home?ocid=ie6_countdown_bannercode">
       <img src="http://storage.ie6countdown.com/assets/100/images/banners/warning_bar_0000_us.jpg" border="0" height="42" width="820" alt="You are using an outdated browser. For a faster, safer browsing experience, upgrade for free today." />
    </a>
  </div>
<![endif]-->
<!--[if lt IE 9]>
    <script src="js/html5.js"></script>
    <link rel="stylesheet" href="css/ie.css"> 
<![endif]-->
</head>
<body>

<?php include('menu.php'); ?>

<div class="bg-main" onClick="myFunctionDisplayNone()">
    <header>
        <div class="container_24">
            <div class="wrapper">                        
                <br><br>                          
            </div><br><br>         

<?php

include('includes/koneksi.php');


// PHP Mailer 

require 'C:/xampp/htdocs/phpmailer/PHPMailerAutoload.php';
 //memanggil library php mailernya


function smtpmailer($to, $from, $from_name, $subject, $body) {

global $error;

$mail = new PHPMailer();

//$mail->AuthType = 'NTLM';

$mail->IsSMTP();

//$mail->SMTPDebug = 0;  // untuk memunculkan pesan error /debug di layar

$mail->SMTPAuth = true;  // authentifikasi smtp enable atau disable

$mail->SMTPSecure = "";//‘ssl atau di kosongkas jika none’; // secure transfer membutuhkan authentifikasi dari mail server

$mail->Host ='ssl://smtp.gmail.com:465;tls://smtp.gmail.com:587'; // masukkan nama host email “diawal ssl://”

$mail->Port = 587; //port secure ssl email

$mail->Username = "davy.yg1@gmail.com"; //username email

$mail->Password = "********"; //password email

$mail->SetFrom($from, $from_name);

$mail->Subject = $subject;

$mail->Body = $body;

$mail->AddAddress($to);

if(!$mail->Send()) {

$error = "Mail error: ".$mail->ErrorInfo;

return false;

} else {

$error = "Message sent!";

return true;

}

}

    $result = mysql_query("SELECT * FROM student WHERE student_id = ".$_GET['student_id']."") or die(mysql_error());
    $data = mysql_fetch_array($result);


// write program to send email to the recorded email address

    /*
    require_once('recaptchalib.php');
    $name = strip_tags(@$_POST['name']);
    $email = str_replace(" ", "", strip_tags(@$_POST['email']));
    $phone = str_replace(" ", "", strip_tags(@$_POST['phone']));
    $message = strip_tags(@$_POST['message']); */
    $name = $data['stu_fname'];
    $email = $data['stu_email'];
    $phone = $data['stu_telp'];
    $message = "Dear ".$data['stu_fname'].","."\r\r".
    "Please transfer your payment to:\r\r




    and after you made your payment please confirm your payment to: squprime@mail.com";

    /*if (@$_POST['submit']) {*/
    if ($name&&$email&&$phone&&$message) {
    if (is_numeric($phone)) {
    /*$privatekey = "6LfjvdcSAAAAAHNcKjYO5DhTNefxYZHYcfhtrvGC";
    $resp = recaptcha_check_answer($privatekey,
    $_SERVER["REMOTE_ADDR"],
    $_POST["recaptcha_challenge_field"],
    $_POST["recaptcha_response_field"]);
    if (!$resp->is_valid) {
    //What happens when the CAPTCHA was entered incorrectly
    echo "The reCAPTCHA wasn't entered correctly.";
    } else { */
    //Your code here to handle a successful verification
    //ini_set("SMTP", "smtp.indonusa.net.id");
    $body = "
    Name: ".$name."
    Phone: ".$phone."
    Email: ".$email."\n\n
    ".$message;
    //mail("davy@indonusa.net.id", "Message from Innovation Website", $body, "From: ".$email
    smtpmailer("davy.yg1@gmail.com", "davy.yg1@gmail.com", "Davy", "Test Email", $body); // script kirim email

    echo "Your message has been sent, we will get back to your shortly.";
    $name = trim("");
    $email = trim("");
    $phone = trim("");
    $message = trim("");
    }
    }
    else
    echo "There should only be numbers in your phone number.";
    /*} */
    /*else
    echo "Please fill in <b>all</b> the fields!";
    } */

?>          



<h3>PLEASE COMPLETE THE FOLLOWING REGISTRATION PROGRESS!</h3><br><br>

<div style="font-family: Tahoma">
<form id="registration-form">

<table style="width: 1000px">

<img src="images/registrationbar5.png" height="70px" width="850px"><br><br><br>

<tr>Please Transfer your payment to:<br>
<br>
<br>
<br><br>
An email has been sent to you.  Please confirm your payment afterward.
<?php /*
<table style="width: 300px;">
<tr>
<td>Name:</td>
<td><input type="text" value=""></td><br>
</tr>
<tr>
<td>Payment Date:&nbsp;&nbsp;</td>
<td><input type="text" value=""></td><br>
</tr>
<tr>
<td>Account#:</td>
<td><input type="text" value=""></td><br><br>
</tr><br>

</table> 
*/ ?>
<br>

</table>     
</div>

<br><br>
<?php include('includes/setting.php'); ?>  

<div class="buttons"><a class="button" data-type="register" onClick="window.location.href='<?php SITEURL ?>registration5.php';">FINISH</a></div><br><br>                         

</form>

</div>

<?php include('footer.php'); ?>

</body>
</html>
0

I also wonder why I do not receive any email on registration5.php - I receive an email on registration2.php (the code on previous post). I copy part of code to send on registration2.php to registration5.php

0

If sending through GMail then the From header must be the GMail user, to receive the emails at indonusa.net.id, you have to add the Reply-To header, so:

$from = 'davy.yg1@gmail.com';
$mail->SetFrom($from, $from_name);
$mail->addReplyTo('info@indonusa.net.id', 'Info');
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.