Jump to content

ASK Test email eror


Recommended Posts

Tolong dong saya masih newby nih.
saat melakukan transaksi kenapa ada email yg masuk. setelah saya lakukan setting di mail allert, kemudian mails/id sudah saya copikan dr en
waktu saya kirim tes email keluar tulisan seperti di bawah.

"eror: harap periksa konfigurasi email Anda."
"Sending failed using mail()as PHP's default mail() funcion return boolean FALSE."

solusinya gmn ya gan? mohon bantuannya.

 

post-1308299-0-04431000-1472955772_thumb.jpg

Link to comment
Share on other sites

Tolong dong saya masih newby nih.

saat melakukan transaksi kenapa ada email yg masuk. setelah saya lakukan setting di mail allert, kemudian mails/id sudah saya copikan dr en

waktu saya kirim tes email keluar tulisan seperti di bawah.

 

"eror: harap periksa konfigurasi email Anda."

"Sending failed using mail()as PHP's default mail() funcion return boolean FALSE."

 

solusinya gmn ya gan? mohon bantuannya.

 

Untuk mencari penyebabnya, coba buat file test-email.php berisi script php sbb :

// test-email.php
$from    = '[email protected]';// ganti dengan alamat email pengirim yang sebenarnya
$to      = '[email protected]';// ganti dengan alamat email tujuan yang sebenarnya

$subject = 'Test email dengan fungsi php mail()';
$message = 'Test email ' . __FILE__ . ' ' . date('d-m-Y H:i:s');
$headers = 'From: ' . $from ."\r\n" .
    'Reply-To: ' . $from . "\r\n" .
    'X-Mailer: PHP/' . phpversion();

// Tampilkan hasil pengujian
echo '<pre>';
echo 'PHP mail() result <br />';
echo 'From : '.$from.'<br />';
echo 'To : '.$to.'<br />';
echo 'Subject : '.$subject.'<br />';
var_dump(mail($to, $subject, $message, $headers));
echo '</pre>';

Eksekusi file tsb >> http://domain-anda.com/test-email.php

coba ganti-ganti alamat email tujuan, misalnya [email protected] ; [email protected]

Posting hasilnya disini

Link to comment
Share on other sites

Untuk mencari penyebabnya, coba buat file test-email.php berisi script php sbb :

// test-email.php
$from    = '[email protected]';// ganti dengan alamat email pengirim yang sebenarnya
$to      = '[email protected]';// ganti dengan alamat email tujuan yang sebenarnya

$subject = 'Test email dengan fungsi php mail()';
$message = 'Test email ' . __FILE__ . ' ' . date('d-m-Y H:i:s');
$headers = 'From: ' . $from ."\r\n" .
    'Reply-To: ' . $from . "\r\n" .
    'X-Mailer: PHP/' . phpversion();

// Tampilkan hasil pengujian
echo '<pre>';
echo 'PHP mail() result <br />';
echo 'From : '.$from.'<br />';
echo 'To : '.$to.'<br />';
echo 'Subject : '.$subject.'<br />';
var_dump(mail($to, $subject, $message, $headers));
echo '</pre>';

Eksekusi file tsb >> http://domain-anda.com/test-email.php

coba ganti-ganti alamat email tujuan, misalnya [email protected] ; [email protected]

Posting hasilnya disini

kok hasilnya malh gni ya? binging. maap bru belajar

http://dodoljenangmubarok.com/test-email.php

saya klik test email masih tetap eror

 

 

Card yg mana mksdnya gan?

Cart mungkin ya? Ada url nya biar bs di cek?

cart di troli. kalau ada barangnya mis. Rp 17.000

kalau kosong $0.00

Edited by Mubarokfood (see edit history)
Link to comment
Share on other sites

http://dodoljenangmubarok.com/test-mail.php

 

itu file PHP jadi harus anda beri PHP opening tag diawal isi filenya

<?php
// isi file disini ...

:rolleyes:

maksutnya opening seperti ini?

maaf klo file php saya masih belum paham soalnya..
 
<?php

// define variables and set to empty values

$nameErr = $emailErr = $genderErr = $websiteErr = "";

$name = $email = $gender = $comment = $website = "";

 

if ($_SERVER["REQUEST_METHOD"] == "POST") {

  if (empty($_POST["name"])) {

    $nameErr = "Name is required";

  } else {

    $name = test_input($_POST["name"]);

    // check if name only contains letters and whitespace

    if (!preg_match("/^[a-zA-Z ]*$/",$name)) {

      $nameErr = "Only letters and white space allowed";

    }

  }

 

  if (empty($_POST["email"])) {

    $emailErr = "Email is required";

  } else {

    $email = test_input($_POST["email"]);

    // check if e-mail address is well-formed

    if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {

      $emailErr = "Invalid email format";

    }

  }

 

  if (empty($_POST["website"])) {

    $website = "";

  } else {

    $website = test_input($_POST["website"]);

    // check if URL address syntax is valid (this regular expression also allows dashes in the URL)

    if (!preg_match("/\b(?:(?:https?|ftp):\/\/|www\.)[-a-z0-9+&@#\/%?=~_|!:,.;]*[-a-z0-9+&@#\/%=~_|]/i",$website)) {

      $websiteErr = "Invalid URL";

    }

  }

 

  if (empty($_POST["comment"])) {

    $comment = "";

  } else {

    $comment = test_input($_POST["comment"]);

  }

 

  if (empty($_POST["gender"])) {

    $genderErr = "Gender is required";

  } else {

    $gender = test_input($_POST["gender"]);

  }

}

?>

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...