1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
<?php import_request_variables('pG', 'p_'); if($p_topic!="") { $topic=trim($p_topic); } if($p_sender_name!="") { $sender_name=trim($p_sender_name); } if($p_sender_mail!="") { $sender_mail=trim($p_sender_mail); } if($p_evar!="") { $evar=trim($p_evar); } bar_header("ส่งข้อมูลสำเร็จ"); fieldset_top("ส่งข้อมูลสำเร็จ"); $message =strip_tags($evar); $recive_name = $main_data[email];
//sendmail($sender_name,$sender_mail,$recive_name,$topic,$evar); // so easy then don't use = =" /* $mail= new Mail; // create the mail $mail->From($sender_mail); $mail->To($recive_name); $mail->Subject($topic );
$message= $evar; $mail->Body($message); // set the body // $m->Cc( "someone@somewhere.fr"); // $m->Bcc( "someoneelse@somewhere.fr"); $mail->Priority(4) ; // set the priority to Low $file_send = $_SERVER['HTTP_HOST']."/index.php"; $mail->Attach($file_send) ; // attach a file of type image/gif $mail->Send(); // send the mail // echo "the mail below has been sent:<br><pre>", $m->Get(), "</pre>"; )/ */ $mail = new MIMEMAIL("HTML");
$mail->senderName = $sender_name; $mail->senderMail = $sender_mail; //$mail->bcc = "bcc@email";
$mail->subject = $topic;
$mail->body = $message; // OR: $mail->body = "path_to_file/filename";
$mail->attachment[] = "contact.php"; //$mail->attachment[] = "path_to_file2/filename2"; //...
$mail->create();
$mail->send($recive_name); //$mail->send("recipient2@email,recipient3@email,recipient4@email");
echo"<br/><b><center>ส่งข้อมูลแล้ว</center><br/></b>"; echo "<meta http-equiv='refresh' content='2; url=index.php'>" ; fieldset_down(); ?>
|