Welcome
Welcome to <strong>STEKOM Semarang</strong>.

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. Registration is fast, simple, and absolutely free, so please, <a href="/profile.php?mode=register">join our community today</a>!

php mailer

Membahas semua masalah pemrograman Web dengan PHP.

Moderators: djoko, slam, darminto

php mailer

Postby slam on Tue Oct 30, 2007 10:49 am

biasanya kalo kita mengirim email lewat fungsi mail()

nah dengan kelas phpmailer mungkin lebih memudahkan dalam mengirim email bahkan bisa melampirkan attachment

$mail = new PHPMailer();
$mail->From = 'emailmu@opo.com'; //email pengirim smtpnya
$mail->FromName = 'namamu'; nama pengirim
$mail->AddAddress($rep_email, $rep_name);
$mail->AddAddress($Bcc, $BccName); // name is optional
$mail->AddReplyTo($sender_email, $sender_name);

$mail->WordWrap = 50; // set word wrap to 50 characters
$mail->AddAttachment($pdfFileLoc); // add attachments
//$mail->AddAttachment("/tmp/image.jpg", "new.jpg"); // optional name
$mail->IsHTML(false); // set email format to HTML

$mail->Subject = 'subject';// subject email
$mail->Body = 'pesan'; //pesan
$mail->AltBody = "This is the body in plain text for non-HTML mail clients";

nah lebih jelasnya silahkan pelajari dokumentasinya sendiri dan download

classnya di

http://phpmailer.sourceforge.net/
function greeting(){
$msg='salam dasyat';
return $msg;
}
User avatar
slam
Pentium Core 2 Duo
 
Posts: 172
Joined: Wed Oct 24, 2007 4:38 pm
Location: semarang->penggaron

Postby fujiama on Tue Oct 30, 2007 11:53 am

Bagus banget ni boss.... (he..he.. manggil apa yah?? kaka, senior atau komandan..? just kidding :D Ok manggil mas slam aja yah mas..)


yah sangat membantu mas slam tutorialnya (Mail yg bisa melampirkan attachment)

tengkyu mas... ini sangat baik tuk dukung tugas kuliahku yg berhungan dengan pengiriman mail.
fujiama
Processor 8088
 
Posts: 3
Joined: Mon Oct 29, 2007 11:22 pm
Location: Semarang


Return to PHP

Who is online

Users browsing this forum: No registered users and 0 guests