Xataface Email Module
0.3.2
Email/Mailmerge Module for Xataface
Main Page
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Pages
lib
XPM
EXAMPLES
mail-local.php
Go to the documentation of this file.
1
<?php
2
3
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
4
* *
5
* XPertMailer is a PHP Mail Class that can send and read messages in MIME format. *
6
* This file is part of the XPertMailer package (http://xpertmailer.sourceforge.net/) *
7
* Copyright (C) 2007 Tanase Laurentiu Iulian *
8
* *
9
* This library is free software; you can redistribute it and/or modify it under the *
10
* terms of the GNU Lesser General Public License as published by the Free Software *
11
* Foundation; either version 2.1 of the License, or (at your option) any later version. *
12
* *
13
* This library is distributed in the hope that it will be useful, but WITHOUT ANY *
14
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A *
15
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. *
16
* *
17
* You should have received a copy of the GNU Lesser General Public License along with *
18
* this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, *
19
* Fifth Floor, Boston, MA 02110-1301, USA *
20
* *
21
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
22
23
/* Purpose:
24
- set text message
25
- send mail using local MTA support (function mail() from php)
26
- print result
27
*/
28
29
// manage errors
30
error_reporting(E_ALL);
// php errors
31
define(
'DISPLAY_XPM4_ERRORS'
,
true
);
// display XPM4 errors
32
33
// path to 'MAIL.php' file from XPM4 package
34
require_once
'../MAIL.php'
;
35
36
// initialize MAIL class
37
$m
=
new
MAIL;
38
// set from address
39
$m
->From(
'me@myaddress.net'
);
40
// add to address
41
$m
->AddTo(
'client@destination.net'
);
42
// set subject
43
$m
->Subject(
'Hello World!'
);
44
// set text message
45
$m
->Text(
'Text message.'
);
46
47
// send mail
48
echo
$m
->Send() ?
'Mail sent !'
:
'Error !'
;
49
50
?>
Generated on Tue Mar 12 2013 11:27:42 for Xataface Email Module by
1.8.1.2