diff options
author | Karl Vollmer <karl.vollmer@dal.ca> | 2011-11-23 08:56:57 -0400 |
---|---|---|
committer | Karl Vollmer <karl.vollmer@dal.ca> | 2011-11-23 08:56:57 -0400 |
commit | 292aa281a02bd2aabbee2379ac06419e50fe1ba8 (patch) | |
tree | c733050539f117b5f479b60cfb414b4ae0000b82 /modules | |
parent | 86c7b8213585fc08ecb6f671d9a654e3ddf55bc4 (diff) | |
download | ampache-292aa281a02bd2aabbee2379ac06419e50fe1ba8.tar.gz ampache-292aa281a02bd2aabbee2379ac06419e50fe1ba8.tar.bz2 ampache-292aa281a02bd2aabbee2379ac06419e50fe1ba8.zip |
Removed examples
Diffstat (limited to 'modules')
17 files changed, 0 insertions, 662 deletions
diff --git a/modules/phpmailer/examples/contents.html b/modules/phpmailer/examples/contents.html deleted file mode 100644 index fc4c3088..00000000 --- a/modules/phpmailer/examples/contents.html +++ /dev/null @@ -1,20 +0,0 @@ -<body style="margin: 10px;"> -<div style="width: 640px; font-family: Arial, Helvetica, sans-serif; font-size: 11px;"> -<div align="center"><img src="images/phpmailer.gif" style="height: 90px; width: 340px"></div><br> -<br> - This is a test of PHPMailer.<br> -<br> -This particular example uses <strong>HTML</strong>, with a <div> tag and inline<br> -styles.<br> -<br> -Also note the use of the PHPMailer logo above with no specific code to handle -including it.<br /> -Included are two attachments:<br /> -phpmailer.gif is an attachment and used inline as a graphic (above)<br /> -phpmailer_mini.gif is an attachment<br /> -<br /> -PHPMailer:<br /> -Author: Andy Prevost (codeworxtech@users.sourceforge.net)<br /> -Author: Marcus Bointon (coolbru@users.sourceforge.net)<br /> -</div> -</body> diff --git a/modules/phpmailer/examples/images/phpmailer.gif b/modules/phpmailer/examples/images/phpmailer.gif Binary files differdeleted file mode 100644 index 5e269714..00000000 --- a/modules/phpmailer/examples/images/phpmailer.gif +++ /dev/null diff --git a/modules/phpmailer/examples/images/phpmailer_mini.gif b/modules/phpmailer/examples/images/phpmailer_mini.gif Binary files differdeleted file mode 100644 index dc7d7827..00000000 --- a/modules/phpmailer/examples/images/phpmailer_mini.gif +++ /dev/null diff --git a/modules/phpmailer/examples/index.html b/modules/phpmailer/examples/index.html deleted file mode 100644 index c829bbcc..00000000 --- a/modules/phpmailer/examples/index.html +++ /dev/null @@ -1,49 +0,0 @@ -This release of PHPMailer (v5.0.0) sets a new milestone in the development -cycle of PHPMailer. First, class.phpmailer.php has a small footprint (65.7 Kb), -while class.smtp.php is even smaller than before (at only 25.0 Kb).<br /> -<br /> -We have maintained all functionality and added Exception handling unique to -PHP 5/6.<br /> -<br /> -There is only one function that has been removed: that is getFile(). The reason -for this is that getFile() became a wrapper for the PHP function 'file_get_contents()' -and nothing more. Rather than burden the class with a function already available -in PHP, we decided to remove it.<br /> -<br /> -Our new Exception handling provides your own scripts far more power than ever.<br /> -<br /> -We have also enhanced the "packaging" of PHPMailer with an entirely new set of -examples. Included are both basic and advanced examples showing how you can take -advantage of PHP Exception handling to improve your own scripts.<br /> -<br /> -A few things to note about PHPMailer: -<ul> - <li>the use of $mail->AltBody is completely optional. If not used, PHPMailer - will use the HTML text with htmlentities().<br /> - We also highly recommend using HTML2Text authored by Jon Abernathy. The class description - and download can be viewed at: http://www.chuggnutt.com/html2text.php. - </li> - <li>there is no specific code to define image or attachment types ... that is handled - automatically by PHPMailer when it parses the images</li> -</ul> -A note to users that want to use SMTP with PHPMailer. The most common problems are: -<ul> - <li>wrong port ... most ISP (Internet Service Providers) will not allow relaying through - their servers. If that's the case with your ISP, try using port 26. - </li> - <li>wrong authentication information (username and/or password) ... don't forget that - many servers require the account name to be in the format of the full email address. - </li> - <li>... if these tips do not get your SMTP settings working, we have a debug mode - for helping you determine the problem. Insert this after $mail->IsSMTP();<br /> - $mail->SMTPDebug = 2; // enables SMTP debug information (for testing)<br /> - note that a setting of 2 will display all errors and messages generated by the SMTP - server<br /> - </li> -</ul> -Our examples all use an HTML file in the /examples folder. To see what the email SHOULD -look like in your HTML compatible email viewer: <a href="contents.html">click here</a><br> -<br /> -From the PHPMailer team:<br /> -Author: Andy Prevost (codeworxtech) codeworxtech@users.sourceforge.net (and Project Administrator)<br /> -Author: Marcus Bointon (coolbru) coolbru@users.sourceforge.net<br /> diff --git a/modules/phpmailer/examples/test_db_smtp_basic.php b/modules/phpmailer/examples/test_db_smtp_basic.php deleted file mode 100644 index 9c16fb0b..00000000 --- a/modules/phpmailer/examples/test_db_smtp_basic.php +++ /dev/null @@ -1,58 +0,0 @@ -<html> -<head> -<title>PHPMailer - MySQL Database - SMTP basic test with authentication</title> -</head> -<body> - -<?php - -//error_reporting(E_ALL); -error_reporting(E_STRICT); - -date_default_timezone_set('America/Toronto'); - -require_once('../class.phpmailer.php'); -//include("class.smtp.php"); // optional, gets called from within class.phpmailer.php if not already loaded - -$mail = new PHPMailer(); - -$body = file_get_contents('contents.html'); -$body = eregi_replace("[\]",'',$body); - -$mail->IsSMTP(); // telling the class to use SMTP -$mail->Host = "smtp1.site.com;smtp2.site.com"; -$mail->SMTPAuth = true; // enable SMTP authentication -$mail->SMTPKeepAlive = true; // SMTP connection will not close after each email sent -$mail->Host = "mail.yourdomain.com"; // sets the SMTP server -$mail->Port = 26; // set the SMTP port for the GMAIL server -$mail->Username = "yourname@yourdomain"; // SMTP account username -$mail->Password = "yourpassword"; // SMTP account password -$mail->SetFrom('list@mydomain.com', 'List manager'); -$mail->AddReplyTo('list@mydomain.com', 'List manager'); - -$mail->Subject = "PHPMailer Test Subject via smtp, basic with authentication"; - -@MYSQL_CONNECT("localhost","root","password"); -@mysql_select_db("my_company"); -$query = "SELECT full_name, email, photo FROM employee WHERE id=$id"; -$result = @MYSQL_QUERY($query); - -while ($row = mysql_fetch_array ($result)) { - $mail->AltBody = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test - $mail->MsgHTML($body); - $mail->AddAddress($row["email"], $row["full_name"]); - $mail->AddStringAttachment($row["photo"], "YourPhoto.jpg"); - - if(!$mail->Send()) { - echo "Mailer Error (" . str_replace("@", "@", $row["email"]) . ') ' . $mail->ErrorInfo . '<br />'; - } else { - echo "Message sent to :" . $row["full_name"] . ' (' . str_replace("@", "@", $row["email"]) . ')<br />'; - } - // Clear all addresses and attachments for next loop - $mail->ClearAddresses(); - $mail->ClearAttachments(); -} -?> - -</body> -</html> diff --git a/modules/phpmailer/examples/test_mail_advanced.php b/modules/phpmailer/examples/test_mail_advanced.php deleted file mode 100644 index 38e27902..00000000 --- a/modules/phpmailer/examples/test_mail_advanced.php +++ /dev/null @@ -1,31 +0,0 @@ -<html> -<head> -<title>PHPMailer - Mail() advanced test</title> -</head> -<body> - -<?php -require_once '../class.phpmailer.php'; - -$mail = new PHPMailer(true); //defaults to using php "mail()"; the true param means it will throw exceptions on errors, which we need to catch - -try { - $mail->AddReplyTo('name@yourdomain.com', 'First Last'); - $mail->AddAddress('whoto@otherdomain.com', 'John Doe'); - $mail->SetFrom('name@yourdomain.com', 'First Last'); - $mail->AddReplyTo('name@yourdomain.com', 'First Last'); - $mail->Subject = 'PHPMailer Test Subject via mail(), advanced'; - $mail->AltBody = 'To view the message, please use an HTML compatible email viewer!'; // optional - MsgHTML will create an alternate automatically - $mail->MsgHTML(file_get_contents('contents.html')); - $mail->AddAttachment('images/phpmailer.gif'); // attachment - $mail->AddAttachment('images/phpmailer_mini.gif'); // attachment - $mail->Send(); - echo "Message Sent OK</p>\n"; -} catch (phpmailerException $e) { - echo $e->errorMessage(); //Pretty error messages from PHPMailer -} catch (Exception $e) { - echo $e->getMessage(); //Boring error messages from anything else! -} -?> -</body> -</html> diff --git a/modules/phpmailer/examples/test_mail_basic.php b/modules/phpmailer/examples/test_mail_basic.php deleted file mode 100644 index f8411fb0..00000000 --- a/modules/phpmailer/examples/test_mail_basic.php +++ /dev/null @@ -1,43 +0,0 @@ -<html> -<head> -<title>PHPMailer - Mail() basic test</title> -</head> -<body> - -<?php - -require_once('../class.phpmailer.php'); - -$mail = new PHPMailer(); // defaults to using php "mail()" - -$body = file_get_contents('contents.html'); -$body = eregi_replace("[\]",'',$body); - -$mail->AddReplyTo("name@yourdomain.com","First Last"); - -$mail->SetFrom('name@yourdomain.com', 'First Last'); - -$mail->AddReplyTo("name@yourdomain.com","First Last"); - -$address = "whoto@otherdomain.com"; -$mail->AddAddress($address, "John Doe"); - -$mail->Subject = "PHPMailer Test Subject via mail(), basic"; - -$mail->AltBody = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test - -$mail->MsgHTML($body); - -$mail->AddAttachment("images/phpmailer.gif"); // attachment -$mail->AddAttachment("images/phpmailer_mini.gif"); // attachment - -if(!$mail->Send()) { - echo "Mailer Error: " . $mail->ErrorInfo; -} else { - echo "Message sent!"; -} - -?> - -</body> -</html> diff --git a/modules/phpmailer/examples/test_pop_before_smtp_advanced.php b/modules/phpmailer/examples/test_pop_before_smtp_advanced.php deleted file mode 100644 index ee9d839e..00000000 --- a/modules/phpmailer/examples/test_pop_before_smtp_advanced.php +++ /dev/null @@ -1,40 +0,0 @@ -<html> -<head> -<title>POP before SMTP Test</title> -</head> -<body> - -<?php -require_once('../class.phpmailer.php'); -require_once('../class.pop3.php'); // required for POP before SMTP - -$pop = new POP3(); -$pop->Authorise('pop3.yourdomain.com', 110, 30, 'username', 'password', 1); - -$mail = new PHPMailer(true); // the true param means it will throw exceptions on errors, which we need to catch - -$mail->IsSMTP(); - -try { - $mail->SMTPDebug = 2; - $mail->Host = 'pop3.yourdomain.com'; - $mail->AddReplyTo('name@yourdomain.com', 'First Last'); - $mail->AddAddress('whoto@otherdomain.com', 'John Doe'); - $mail->SetFrom('name@yourdomain.com', 'First Last'); - $mail->AddReplyTo('name@yourdomain.com', 'First Last'); - $mail->Subject = 'PHPMailer Test Subject via mail(), advanced'; - $mail->AltBody = 'To view the message, please use an HTML compatible email viewer!'; // optional - MsgHTML will create an alternate automatically - $mail->MsgHTML(file_get_contents('contents.html')); - $mail->AddAttachment('images/phpmailer.gif'); // attachment - $mail->AddAttachment('images/phpmailer_mini.gif'); // attachment - $mail->Send(); - echo "Message Sent OK</p>\n"; -} catch (phpmailerException $e) { - echo $e->errorMessage(); //Pretty error messages from PHPMailer -} catch (Exception $e) { - echo $e->getMessage(); //Boring error messages from anything else! -} -?> - -</body> -</html> diff --git a/modules/phpmailer/examples/test_pop_before_smtp_basic.php b/modules/phpmailer/examples/test_pop_before_smtp_basic.php deleted file mode 100644 index f01bd824..00000000 --- a/modules/phpmailer/examples/test_pop_before_smtp_basic.php +++ /dev/null @@ -1,49 +0,0 @@ -<html> -<head> -<title>POP before SMTP Test</title> -</head> -<body> - -<?php -require_once('../class.phpmailer.php'); -require_once('../class.pop3.php'); // required for POP before SMTP - -$pop = new POP3(); -$pop->Authorise('pop3.yourdomain.com', 110, 30, 'username', 'password', 1); - -$mail = new PHPMailer(); - -$body = file_get_contents('contents.html'); -$body = eregi_replace("[\]",'',$body); - -$mail->IsSMTP(); -$mail->SMTPDebug = 2; -$mail->Host = 'pop3.yourdomain.com'; - -$mail->SetFrom('name@yourdomain.com', 'First Last'); - -$mail->AddReplyTo("name@yourdomain.com","First Last"); - -$mail->Subject = "PHPMailer Test Subject via POP before SMTP, basic"; - -$mail->AltBody = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test - -$mail->MsgHTML($body); - -$address = "whoto@otherdomain.com"; -$mail->AddAddress($address, "John Doe"); - -$mail->AddAttachment("images/phpmailer.gif"); // attachment -$mail->AddAttachment("images/phpmailer_mini.gif"); // attachment - - -if(!$mail->Send()) { - echo "Mailer Error: " . $mail->ErrorInfo; -} else { - echo "Message sent!"; -} - -?> - -</body> -</html> diff --git a/modules/phpmailer/examples/test_sendmail_advanced.php b/modules/phpmailer/examples/test_sendmail_advanced.php deleted file mode 100644 index 937d31e8..00000000 --- a/modules/phpmailer/examples/test_sendmail_advanced.php +++ /dev/null @@ -1,34 +0,0 @@ -<html> -<head> -<title>PHPMailer - Sendmail advanced test</title> -</head> -<body> - -<?php - -require_once('../class.phpmailer.php'); - -$mail = new PHPMailer(true); // the true param means it will throw exceptions on errors, which we need to catch -$mail->IsSendmail(); // telling the class to use SendMail transport - -try { - $mail->AddReplyTo('name@yourdomain.com', 'First Last'); - $mail->AddAddress('whoto@otherdomain.com', 'John Doe'); - $mail->SetFrom('name@yourdomain.com', 'First Last'); - $mail->AddReplyTo('name@yourdomain.com', 'First Last'); - $mail->Subject = 'PHPMailer Test Subject via mail(), advanced'; - $mail->AltBody = 'To view the message, please use an HTML compatible email viewer!'; // optional - MsgHTML will create an alternate automatically - $mail->MsgHTML(file_get_contents('contents.html')); - $mail->AddAttachment('images/phpmailer.gif'); // attachment - $mail->AddAttachment('images/phpmailer_mini.gif'); // attachment - $mail->Send(); - echo "Message Sent OK</p>\n"; -} catch (phpmailerException $e) { - echo $e->errorMessage(); //Pretty error messages from PHPMailer -} catch (Exception $e) { - echo $e->getMessage(); //Boring error messages from anything else! -} -?> - -</body> -</html> diff --git a/modules/phpmailer/examples/test_sendmail_basic.php b/modules/phpmailer/examples/test_sendmail_basic.php deleted file mode 100644 index f70b0f06..00000000 --- a/modules/phpmailer/examples/test_sendmail_basic.php +++ /dev/null @@ -1,45 +0,0 @@ -<html> -<head> -<title>PHPMailer - Sendmail basic test</title> -</head> -<body> - -<?php - -require_once('../class.phpmailer.php'); - -$mail = new PHPMailer(); // defaults to using php "mail()" - -$mail->IsSendmail(); // telling the class to use SendMail transport - -$body = file_get_contents('contents.html'); -$body = eregi_replace("[\]",'',$body); - -$mail->AddReplyTo("name@yourdomain.com","First Last"); - -$mail->SetFrom('name@yourdomain.com', 'First Last'); - -$mail->AddReplyTo("name@yourdomain.com","First Last"); - -$address = "whoto@otherdomain.com"; -$mail->AddAddress($address, "John Doe"); - -$mail->Subject = "PHPMailer Test Subject via Sendmail, basic"; - -$mail->AltBody = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test - -$mail->MsgHTML($body); - -$mail->AddAttachment("images/phpmailer.gif"); // attachment -$mail->AddAttachment("images/phpmailer_mini.gif"); // attachment - -if(!$mail->Send()) { - echo "Mailer Error: " . $mail->ErrorInfo; -} else { - echo "Message sent!"; -} - -?> - -</body> -</html> diff --git a/modules/phpmailer/examples/test_smtp_advanced.php b/modules/phpmailer/examples/test_smtp_advanced.php deleted file mode 100644 index 9013c8a4..00000000 --- a/modules/phpmailer/examples/test_smtp_advanced.php +++ /dev/null @@ -1,43 +0,0 @@ -<html> -<head> -<title>PHPMailer - SMTP advanced test with authentication</title> -</head> -<body> - -<?php - -require_once('../class.phpmailer.php'); -//include("class.smtp.php"); // optional, gets called from within class.phpmailer.php if not already loaded - -$mail = new PHPMailer(true); // the true param means it will throw exceptions on errors, which we need to catch - -$mail->IsSMTP(); // telling the class to use SMTP - -try { - $mail->Host = "mail.yourdomain.com"; // SMTP server - $mail->SMTPDebug = 2; // enables SMTP debug information (for testing) - $mail->SMTPAuth = true; // enable SMTP authentication - $mail->Host = "mail.yourdomain.com"; // sets the SMTP server - $mail->Port = 26; // set the SMTP port for the GMAIL server - $mail->Username = "yourname@yourdomain"; // SMTP account username - $mail->Password = "yourpassword"; // SMTP account password - $mail->AddReplyTo('name@yourdomain.com', 'First Last'); - $mail->AddAddress('whoto@otherdomain.com', 'John Doe'); - $mail->SetFrom('name@yourdomain.com', 'First Last'); - $mail->AddReplyTo('name@yourdomain.com', 'First Last'); - $mail->Subject = 'PHPMailer Test Subject via mail(), advanced'; - $mail->AltBody = 'To view the message, please use an HTML compatible email viewer!'; // optional - MsgHTML will create an alternate automatically - $mail->MsgHTML(file_get_contents('contents.html')); - $mail->AddAttachment('images/phpmailer.gif'); // attachment - $mail->AddAttachment('images/phpmailer_mini.gif'); // attachment - $mail->Send(); - echo "Message Sent OK</p>\n"; -} catch (phpmailerException $e) { - echo $e->errorMessage(); //Pretty error messages from PHPMailer -} catch (Exception $e) { - echo $e->getMessage(); //Boring error messages from anything else! -} -?> - -</body> -</html> diff --git a/modules/phpmailer/examples/test_smtp_advanced_no_auth.php b/modules/phpmailer/examples/test_smtp_advanced_no_auth.php deleted file mode 100644 index 101d2e2b..00000000 --- a/modules/phpmailer/examples/test_smtp_advanced_no_auth.php +++ /dev/null @@ -1,37 +0,0 @@ -<html> -<head> -<title>PHPMailer - SMTP advanced test with no authentication</title> -</head> -<body> - -<?php -require_once('../class.phpmailer.php'); -//include("class.smtp.php"); // optional, gets called from within class.phpmailer.php if not already loaded - -$mail = new PHPMailer(true); // the true param means it will throw exceptions on errors, which we need to catch - -$mail->IsSMTP(); // telling the class to use SMTP - -try { - $mail->Host = "mail.yourdomain.com"; // SMTP server - $mail->SMTPDebug = 2; // enables SMTP debug information (for testing) - $mail->AddReplyTo('name@yourdomain.com', 'First Last'); - $mail->AddAddress('whoto@otherdomain.com', 'John Doe'); - $mail->SetFrom('name@yourdomain.com', 'First Last'); - $mail->AddReplyTo('name@yourdomain.com', 'First Last'); - $mail->Subject = 'PHPMailer Test Subject via mail(), advanced'; - $mail->AltBody = 'To view the message, please use an HTML compatible email viewer!'; // optional - MsgHTML will create an alternate automatically - $mail->MsgHTML(file_get_contents('contents.html')); - $mail->AddAttachment('images/phpmailer.gif'); // attachment - $mail->AddAttachment('images/phpmailer_mini.gif'); // attachment - $mail->Send(); - echo "Message Sent OK</p>\n"; -} catch (phpmailerException $e) { - echo $e->errorMessage(); //Pretty error messages from PHPMailer -} catch (Exception $e) { - echo $e->getMessage(); //Boring error messages from anything else! -} -?> - -</body> -</html> diff --git a/modules/phpmailer/examples/test_smtp_basic.php b/modules/phpmailer/examples/test_smtp_basic.php deleted file mode 100644 index 145f2acf..00000000 --- a/modules/phpmailer/examples/test_smtp_basic.php +++ /dev/null @@ -1,58 +0,0 @@ -<html> -<head> -<title>PHPMailer - SMTP basic test with authentication</title> -</head> -<body> - -<?php - -//error_reporting(E_ALL); -error_reporting(E_STRICT); - -date_default_timezone_set('America/Toronto'); - -require_once('../class.phpmailer.php'); -//include("class.smtp.php"); // optional, gets called from within class.phpmailer.php if not already loaded - -$mail = new PHPMailer(); - -$body = file_get_contents('contents.html'); -$body = eregi_replace("[\]",'',$body); - -$mail->IsSMTP(); // telling the class to use SMTP -$mail->Host = "mail.yourdomain.com"; // SMTP server -$mail->SMTPDebug = 2; // enables SMTP debug information (for testing) - // 1 = errors and messages - // 2 = messages only -$mail->SMTPAuth = true; // enable SMTP authentication -$mail->Host = "mail.yourdomain.com"; // sets the SMTP server -$mail->Port = 26; // set the SMTP port for the GMAIL server -$mail->Username = "yourname@yourdomain"; // SMTP account username -$mail->Password = "yourpassword"; // SMTP account password - -$mail->SetFrom('name@yourdomain.com', 'First Last'); - -$mail->AddReplyTo("name@yourdomain.com","First Last"); - -$mail->Subject = "PHPMailer Test Subject via smtp, basic with authentication"; - -$mail->AltBody = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test - -$mail->MsgHTML($body); - -$address = "whoto@otherdomain.com"; -$mail->AddAddress($address, "John Doe"); - -$mail->AddAttachment("images/phpmailer.gif"); // attachment -$mail->AddAttachment("images/phpmailer_mini.gif"); // attachment - -if(!$mail->Send()) { - echo "Mailer Error: " . $mail->ErrorInfo; -} else { - echo "Message sent!"; -} - -?> - -</body> -</html> diff --git a/modules/phpmailer/examples/test_smtp_basic_no_auth.php b/modules/phpmailer/examples/test_smtp_basic_no_auth.php deleted file mode 100644 index fe72ffa9..00000000 --- a/modules/phpmailer/examples/test_smtp_basic_no_auth.php +++ /dev/null @@ -1,53 +0,0 @@ -<html> -<head> -<title>PHPMailer - SMTP basic test with no authentication</title> -</head> -<body> - -<?php - -//error_reporting(E_ALL); -error_reporting(E_STRICT); - -date_default_timezone_set('America/Toronto'); - -require_once('../class.phpmailer.php'); -//include("class.smtp.php"); // optional, gets called from within class.phpmailer.php if not already loaded - -$mail = new PHPMailer(); - -$body = file_get_contents('contents.html'); -$body = eregi_replace("[\]",'',$body); - -$mail->IsSMTP(); // telling the class to use SMTP -$mail->Host = "mail.yourdomain.com"; // SMTP server -$mail->SMTPDebug = 2; // enables SMTP debug information (for testing) - // 1 = errors and messages - // 2 = messages only - -$mail->SetFrom('name@yourdomain.com', 'First Last'); - -$mail->AddReplyTo("name@yourdomain.com","First Last"); - -$mail->Subject = "PHPMailer Test Subject via smtp, basic with no authentication"; - -$mail->AltBody = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test - -$mail->MsgHTML($body); - -$address = "whoto@otherdomain.com"; -$mail->AddAddress($address, "John Doe"); - -$mail->AddAttachment("images/phpmailer.gif"); // attachment -$mail->AddAttachment("images/phpmailer_mini.gif"); // attachment - -if(!$mail->Send()) { - echo "Mailer Error: " . $mail->ErrorInfo; -} else { - echo "Message sent!"; -} - -?> - -</body> -</html> diff --git a/modules/phpmailer/examples/test_smtp_gmail_advanced.php b/modules/phpmailer/examples/test_smtp_gmail_advanced.php deleted file mode 100644 index 10d98607..00000000 --- a/modules/phpmailer/examples/test_smtp_gmail_advanced.php +++ /dev/null @@ -1,43 +0,0 @@ -<html> -<head> -<title>PHPMailer - SMTP (Gmail) advanced test</title> -</head> -<body> - -<?php -require_once('../class.phpmailer.php'); -//include("class.smtp.php"); // optional, gets called from within class.phpmailer.php if not already loaded - -$mail = new PHPMailer(true); // the true param means it will throw exceptions on errors, which we need to catch - -$mail->IsSMTP(); // telling the class to use SMTP - -try { - $mail->Host = "mail.yourdomain.com"; // SMTP server - $mail->SMTPDebug = 2; // enables SMTP debug information (for testing) - $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('name@yourdomain.com', 'First Last'); - $mail->AddAddress('whoto@otherdomain.com', 'John Doe'); - $mail->SetFrom('name@yourdomain.com', 'First Last'); - $mail->AddReplyTo('name@yourdomain.com', 'First Last'); - $mail->Subject = 'PHPMailer Test Subject via mail(), advanced'; - $mail->AltBody = 'To view the message, please use an HTML compatible email viewer!'; // optional - MsgHTML will create an alternate automatically - $mail->MsgHTML(file_get_contents('contents.html')); - $mail->AddAttachment('images/phpmailer.gif'); // attachment - $mail->AddAttachment('images/phpmailer_mini.gif'); // attachment - $mail->Send(); - echo "Message Sent OK</p>\n"; -} catch (phpmailerException $e) { - echo $e->errorMessage(); //Pretty error messages from PHPMailer -} catch (Exception $e) { - echo $e->getMessage(); //Boring error messages from anything else! -} -?> - -</body> -</html> diff --git a/modules/phpmailer/examples/test_smtp_gmail_basic.php b/modules/phpmailer/examples/test_smtp_gmail_basic.php deleted file mode 100644 index abe22c52..00000000 --- a/modules/phpmailer/examples/test_smtp_gmail_basic.php +++ /dev/null @@ -1,59 +0,0 @@ -<html> -<head> -<title>PHPMailer - SMTP (Gmail) basic test</title> -</head> -<body> - -<?php - -//error_reporting(E_ALL); -error_reporting(E_STRICT); - -date_default_timezone_set('America/Toronto'); - -require_once('../class.phpmailer.php'); -//include("class.smtp.php"); // optional, gets called from within class.phpmailer.php if not already loaded - -$mail = new PHPMailer(); - -$body = file_get_contents('contents.html'); -$body = eregi_replace("[\]",'',$body); - -$mail->IsSMTP(); // telling the class to use SMTP -$mail->Host = "mail.yourdomain.com"; // SMTP server -$mail->SMTPDebug = 2; // enables SMTP debug information (for testing) - // 1 = errors and messages - // 2 = messages only -$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->SetFrom('name@yourdomain.com', 'First Last'); - -$mail->AddReplyTo("name@yourdomain.com","First Last"); - -$mail->Subject = "PHPMailer Test Subject via smtp (Gmail), basic"; - -$mail->AltBody = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test - -$mail->MsgHTML($body); - -$address = "whoto@otherdomain.com"; -$mail->AddAddress($address, "John Doe"); - -$mail->AddAttachment("images/phpmailer.gif"); // attachment -$mail->AddAttachment("images/phpmailer_mini.gif"); // attachment - -if(!$mail->Send()) { - echo "Mailer Error: " . $mail->ErrorInfo; -} else { - echo "Message sent!"; -} - -?> - -</body> -</html> |