Tanya: Tambahkan Email di Script PHP ini Gimana ya?


Status
Not open for further replies.

iidbae

Expert 1.0
Om, om tanya dong.

Ada script PHP
Code:
/*------------------------------------
 * just replace email address with your email address
 ---------------------------------------------*/
$address = "[email protected]";
Jadi mau nambahin alamat penerima lagi.
Itu kan cuman satu penerimanya, misaliniemail ET wmail .com.
Trus supaya bisa nambahin 2 penerima lagi gimana ya?

Apa harus begini?
Code:
/*------------------------------------
 * just replace email address with your email address
 ---------------------------------------------*/
$address = "[email protected]";"[email protected]"; "[email protected]";

terima kasih
 

idnix

Hosting Guru
Verified Provider
source code asli nya gelar, ente nanya kayak gelas tanpa air
 

el_makong

Hosting Guru
pertanyaan yang pertama muncul di kepala saya: "apakah script tersebut terima parameter email sebagai array atau text yang nantinya di explode"
untuk email sendiri bisa menggunakan kode berikut:
PHP:
bool mail ( string $to , string $subject , string $message [, string $additional_headers [, string $additional_parameters ]] )
to

Receiver, or receivers of the mail.

The formatting of this string must comply with » RFC 2822. Some examples are:

source: http://php.net/manual/en/function.mail.php
lagipula, kita gk bisa jawab secara presisi kalo script aslinya gk tercantum (minimal full function + trace)
 

DraCoola

Expert 1.0
update :

barusan saia tjoba pake fungsi mail() sederhana = mempan
baik comma separator ringkas mopun yg versi gondrong
PHP:
<?php
//printilannya
$subject = "tes kirim email";
$address = "[email protected], [email protected], [email protected]";
$from = "[email protected]";

//body email
$msg = "Pesan es teh";

//header
$headers  = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=UTF-8\r\n";
$headers .= "From: <".$from. ">" ;

//berangkatken
mail($address,$subject,$msg,$headers);
echo "Email terkirim ^^";
?>


model di atas harusnja mempan juga buat smtp
kerna fungsi "$to" email di php ya memang bgitulah, baku dan klasik
sama dimana² standar penulisan multiple email penerima tjukup pake comma aja
 
Last edited:
Status
Not open for further replies.

Top