/dev/adei-asec

To get this branch, use:
bzr branch http://darksoft.org/webbzr/dev/adei-asec

« back to all changes in this revision

Viewing changes to includes/PHPMailer-Lite_v5.1/examples/test_sendmail_basic.php

  • Committer: Suren A. Chilingaryan
  • Date: 2011-01-26 02:48:39 UTC
  • mto: This revision was merged to the branch mainline in revision 212.
  • Revision ID: csa@dside.dyndns.org-20110126024839-nv6qp2ie9stmd2dn
Support of Appled devices by Toni Pirhonen

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<html>
 
2
<head>
 
3
<title>PHPMailer - Sendmail basic test</title>
 
4
</head>
 
5
<body>
 
6
 
 
7
<?php
 
8
 
 
9
require_once('../class.phpmailer-lite.php');
 
10
 
 
11
$mail             = new PHPMailerLite(); // defaults to using php "Sendmail" (or Qmail, depending on availability)
 
12
 
 
13
$body             = file_get_contents('contents.html');
 
14
$body             = eregi_replace("[\]",'',$body);
 
15
 
 
16
$mail->SetFrom('name@yourdomain.com', 'First Last');
 
17
 
 
18
$address = "whoto@otherdomain.com";
 
19
$mail->AddAddress($address, "John Doe");
 
20
 
 
21
$mail->Subject    = "PHPMailer Test Subject via Sendmail, basic";
 
22
 
 
23
$mail->AltBody    = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test
 
24
 
 
25
$mail->MsgHTML($body);
 
26
 
 
27
$mail->AddAttachment("images/phpmailer.gif");      // attachment
 
28
$mail->AddAttachment("images/phpmailer_mini.gif"); // attachment
 
29
 
 
30
if(!$mail->Send()) {
 
31
  echo "Mailer Error: " . $mail->ErrorInfo;
 
32
} else {
 
33
  echo "Message sent!";
 
34
}
 
35
 
 
36
?>
 
37
 
 
38
</body>
 
39
</html>