svn:eol-style set to 'native'
[mailer.git] / inc / phpmailer / examples / test_gmail.php
index 9b951f869574ae3cdd2deeaf74a5fa30a7a60503..553976f76f3ed72c684ecebed226dd123e43203c 100644 (file)
@@ -1,45 +1,45 @@
-<?php\r
-\r
-include("class.phpmailer.php");\r
-//include("class.smtp.php"); // optional, gets called from within class.phpmailer.php if not already loaded\r
-\r
-$mail             = new PHPMailer();\r
-\r
-$body             = $mail->getFile('contents.html');\r
-$body             = eregi_replace("[\]",'',$body);\r
-\r
-$mail->IsSMTP();\r
-$mail->SMTPAuth   = true;                  // enable SMTP authentication\r
-$mail->SMTPSecure = "ssl";                 // sets the prefix to the servier\r
-$mail->Host       = "smtp.gmail.com";      // sets GMAIL as the SMTP server\r
-$mail->Port       = 465;                   // set the SMTP port for the GMAIL server\r
-\r
-$mail->Username   = "yourusername@gmail.com";  // GMAIL username\r
-$mail->Password   = "yourpassword";            // GMAIL password\r
-\r
-$mail->AddReplyTo("yourusername@gmail.com","First Last");\r
-\r
-$mail->From       = "name@yourdomain.com";\r
-$mail->FromName   = "First Last";\r
-\r
-$mail->Subject    = "PHPMailer Test Subject via gmail";\r
-\r
-//$mail->Body       = "Hi,<br>This is the HTML BODY<br>";                      //HTML Body\r
-$mail->AltBody    = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test\r
-$mail->WordWrap   = 50; // set word wrap\r
-\r
-$mail->MsgHTML($body);\r
-\r
-$mail->AddAddress("whoto@otherdomain.com", "John Doe");\r
-\r
-$mail->AddAttachment("images/phpmailer.gif");             // attachment\r
-\r
-$mail->IsHTML(true); // send as HTML\r
-\r
-if(!$mail->Send()) {\r
-  echo "Mailer Error: " . $mail->ErrorInfo;\r
-} else {\r
-  echo "Message sent!";\r
-}\r
-\r
-?>\r
+<?php
+
+include("class.phpmailer.php");
+//include("class.smtp.php"); // optional, gets called from within class.phpmailer.php if not already loaded
+
+$mail             = new PHPMailer();
+
+$body             = $mail->getFile('contents.html');
+$body             = eregi_replace("[\]",'',$body);
+
+$mail->IsSMTP();
+$mail->SMTPAuth   = true;                  // enable SMTP authentication
+$mail->SMTPSecure = "ssl";                 // sets the prefix to the servier
+$mail->Host       = "smtp.gmail.com";      // sets GMAIL as the SMTP server
+$mail->Port       = 465;                   // set the SMTP port for the GMAIL server
+
+$mail->Username   = "yourusername@gmail.com";  // GMAIL username
+$mail->Password   = "yourpassword";            // GMAIL password
+
+$mail->AddReplyTo("yourusername@gmail.com","First Last");
+
+$mail->From       = "name@yourdomain.com";
+$mail->FromName   = "First Last";
+
+$mail->Subject    = "PHPMailer Test Subject via gmail";
+
+//$mail->Body       = "Hi,<br>This is the HTML BODY<br>";                      //HTML Body
+$mail->AltBody    = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test
+$mail->WordWrap   = 50; // set word wrap
+
+$mail->MsgHTML($body);
+
+$mail->AddAddress("whoto@otherdomain.com", "John Doe");
+
+$mail->AddAttachment("images/phpmailer.gif");             // attachment
+
+$mail->IsHTML(true); // send as HTML
+
+if(!$mail->Send()) {
+  echo "Mailer Error: " . $mail->ErrorInfo;
+} else {
+  echo "Message sent!";
+}
+
+?>