/openshift/adei

To get this branch, use:
bzr branch http://darksoft.org/webbzr/openshift/adei

« back to all changes in this revision

Viewing changes to includes/PHPMailer-Lite_v5.1/test/testemail.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
<?php
 
2
/**
 
3
* Simple example script using PHPMailer with exceptions enabled
 
4
* @package phpmailer
 
5
* @version $Id$
 
6
*/
 
7
 
 
8
require '../class.phpmailer-lite.php';
 
9
 
 
10
try {
 
11
  $mail = new PHPMailerLite(true); //New instance, with exceptions enabled
 
12
 
 
13
  $body             = file_get_contents('contents.html');
 
14
  $body             = preg_replace('/\\\\/','', $body); //Strip backslashes
 
15
 
 
16
  $mail->AddReplyTo("name@domain.com","First Last");
 
17
 
 
18
  $mail->SetFrom('you@yourdomain.com', 'Your Name');
 
19
 
 
20
  $to = "someone@example...com";
 
21
 
 
22
  $mail->AddAddress($to);
 
23
 
 
24
  $mail->Subject  = "First PHPMailer Message";
 
25
 
 
26
  $mail->AltBody    = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test
 
27
  $mail->WordWrap   = 80; // set word wrap
 
28
 
 
29
  $mail->MsgHTML($body);
 
30
 
 
31
  $mail->IsHTML(true); // send as HTML
 
32
 
 
33
  $mail->Send();
 
34
  echo 'Message has been sent.';
 
35
} catch (phpmailerException $e) {
 
36
  echo $e->errorMessage();
 
37
}
 
38
?>
 
 
b'\\ No newline at end of file'