<?php require_once("mimemail.inc.php"); $mail = new MIMEMAIL("HTML"); // HTML Format $mail->senderName = "sender name"; $mail->senderMail = "sender@email"; $mail->cc = "cc@email"; $mail->bcc = "bcc@email"; $mail->subject = "This is the subject line"; $mail->body = "Hello! This is a message for you."; // OR: $mail->body = "path_to_file/filename"; $mail->attachment[] = "path_to_file1/filename1"; $mail->attachment[] = "path_to_file2/filename2"; $mail->create(); $mail->send("recipient1@email"); $mail->send("recipient2@email,recipient3@email,recipient4@email"); ?>
<html> <head> <title>ThaiCreate.Com PHP Sending Email</title> </head> <body> <?php require_once("mimemail.inc.php"); $mail = new MIMEMAIL("HTML"); // HTML Format $mail->senderName = "Mr.Weerachai Nukitram"; $mail->senderMail = "[email protected]"; $mail->cc = "Mr.Surachai Sirisart<[email protected]>"; $mail->bcc = "[email protected]"; $mail->subject = "Test Send Mail"; $mail->body = "My Body & <b>My Description</b>"; // OR: $mail->body = "path_to_file/filename"; $mail->attachment[] = "thaicreate1.txt"; $mail->attachment[] = "thaicreate2.txt"; $mail->create(); //*** To ***// $mail->send("[email protected]"); $mail->send("[email protected],[email protected],[email protected]"); echo "Email Sending."; ?> </body> </html>
ช่วยกันสนับสนุนรักษาเว็บไซต์ความรู้แห่งนี้ไว้ด้วยการสนับสนุน Source Code 2.0 ของทีมงานไทยครีเอท