PHP Classes

File: hildegard.test.php

Recommend this page to a friend!
  Classes of Achim Schmidt   MailHeaderClass   hildegard.test.php   Download  
File: hildegard.test.php
Role: Example script
Content type: text/plain
Description: PHP Example Script
Class: MailHeaderClass
Class for parsing emailheaders
Author: By
Last change: changed location of example email
Date: 20 years ago
Size: 891 bytes
 

Contents

Class file image Download
<?
require("hildegard.class.php");

/* read testmail from txtfile on webserver (change as needed!) */
$headers = file ('http://dev.waaf.net/hildegard/_hilde_test.txt');

$mail = new hildegard($headers);

echo
"<pre>
Mail is from: "
.htmlentities($mail->from)."
Mail is from name: "
.htmlentities($mail->from_name)."
Mail is from address: "
.htmlentities($mail->from_addr)."
Mail is sent cc: "
.htmlentities($mail->cc)."
Mail is sent to: "
.htmlentities($mail->to)."
Mail was sent on: "
.htmlentities($mail->date)."
Mail has Message-ID: "
.htmlentities($mail->msgid)."
Mail has Subject: "
.htmlentities($mail->subject)."\n";
if(
$mail->anh)
        echo
"Mail has Attachment(s)\n";
echo
"complete header as one string:
------------------------------------
"
.htmlentities($mail->head)."
------------------------------------
"
;
echo
"</pre>";

?>