PHP Classes

File: fwphp/glomodul/z_examples/book_video/03steinmetz_2008/ch09_Email/attachment.php

Recommend this page to a friend!
  Classes of Slavko Srakocic  >  B12 PHP FW  >  fwphp/glomodul/z_examples/book_video/03steinmetz_2008/ch09_Email/attachment.php  >  Download  
File: fwphp/glomodul/z_examples/book_video/03steinmetz_2008/ch09_Email/attachment.php
Role: Example script
Content type: text/plain
Description: Example script
Class: B12 PHP FW
Manage database records with a PDO CRUD interface
Author: By
Last change:
Date: 3 months ago
Size: 450 bytes
 

Contents

Class file image Download
<?php
include_once("phpmailer/class.phpmailer.php");
$mail = new PHPMailer;
$mail->ClearAddresses();
$mail->AddAddress('bri@aem7.net', 'Brian Ward');
$mail->From = 'test@example.com';
$mail->FromName = 'Test Name';
$mail->Subject = 'Test Message Subject';
$mail->Body = 'This is the test message body.';
$mail->AddAttachment("/home/bri/goofy.jpg", "goofy.jpg");
if (
$mail->Send()) {
    echo
"Message sent.";
} else {
    echo
$mail->ErrorInfo;
}
?>

For more information send a message to info at phpclasses dot org.