PHP Classes

File: mail_example.php

Recommend this page to a friend!
  Classes of Vedanta Barooah   Grab URL   mail_example.php   Download  
File: mail_example.php
Role: Example script
Content type: text/plain
Description: Example Usage
Class: Grab URL
Grab an HTML page and send by e-mail or display it
Author: By
Last change: changed email addresses
Date: 19 years ago
Size: 448 bytes
 

Contents

Class file image Download
<?
// this script will grab yahoo.com and send it in your mailbox
include("grabUrl.php");
$foo=new grabUrl();
$foo->createTo("joe@xyz.com");
$foo->createCC("bill@xyz.com");
$foo->createBCC("fred@xyz.com");
$foo->createFrom("Fred Dust","dust@xyz.com");
$foo->createSubject("This is a test mail! Please Ignore!");
$foo->getData("http://www.yahoo.com");
if(
$foo->sendMail()){
    echo
"Mail Sent!";
}else{
    echo
"Error Sending Mail!";
}
?>