dependabot-linguist 0.0.1 → 0.212.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (223) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +25 -3
  3. data/Gemfile +0 -9
  4. data/Gemfile.lock +162 -5
  5. data/LICENSE +674 -1
  6. data/{LICENSE.Nonstandard → LICENSE.dependabot-core} +0 -0
  7. data/Makefile +8 -1
  8. data/README.md +39 -5
  9. data/demo_script.rb +50 -0
  10. data/dependabot-linguist.gemspec +16 -5
  11. data/devlog.md +186 -0
  12. data/exe/dependabot-linguist +145 -0
  13. data/lib/dependabot/linguist/dependabot_file_validator.rb +190 -0
  14. data/lib/dependabot/linguist/dependabot_patch.rb +8 -0
  15. data/lib/dependabot/linguist/file_fetchers/base.rb +48 -0
  16. data/lib/dependabot/linguist/file_fetchers/git_submodules.rb +63 -0
  17. data/lib/dependabot/linguist/file_fetchers/go_modules.rb +41 -0
  18. data/lib/dependabot/linguist/language.rb +62 -0
  19. data/lib/dependabot/linguist/languages_to_ecosystems/contexts.rb +234 -0
  20. data/lib/dependabot/linguist/languages_to_ecosystems/contexts_applied.rb +36 -0
  21. data/lib/dependabot/linguist/languages_to_ecosystems/languages.yaml +7950 -0
  22. data/lib/dependabot/linguist/languages_to_ecosystems/main.rb +55 -0
  23. data/lib/dependabot/linguist/languages_to_ecosystems/manager_ecosystem_maps.rb +154 -0
  24. data/lib/dependabot/linguist/languages_to_patch.txt +37 -0
  25. data/lib/dependabot/linguist/linguist_patch.rb +6 -0
  26. data/lib/dependabot/linguist/repository.rb +232 -0
  27. data/lib/dependabot/linguist/version.rb +1 -1
  28. data/lib/dependabot/linguist.rb +5 -2
  29. data/smoke-test/README.md +58 -0
  30. data/smoke-test/bundler/Gemfile +9 -0
  31. data/smoke-test/bundler/Gemfile.lock +47 -0
  32. data/smoke-test/bundler/dependabot-all-updates-test-staging.gemspec +10 -0
  33. data/smoke-test/cargo/Cargo.lock +90 -0
  34. data/smoke-test/cargo/Cargo.toml +8 -0
  35. data/smoke-test/composer/composer.json +5 -0
  36. data/smoke-test/composer/composer.lock +72 -0
  37. data/smoke-test/composer/vendor/autoload.php +7 -0
  38. data/smoke-test/composer/vendor/composer/ClassLoader.php +445 -0
  39. data/smoke-test/composer/vendor/composer/LICENSE +21 -0
  40. data/smoke-test/composer/vendor/composer/autoload_classmap.php +13 -0
  41. data/smoke-test/composer/vendor/composer/autoload_namespaces.php +9 -0
  42. data/smoke-test/composer/vendor/composer/autoload_psr4.php +9 -0
  43. data/smoke-test/composer/vendor/composer/autoload_real.php +55 -0
  44. data/smoke-test/composer/vendor/composer/autoload_static.php +23 -0
  45. data/smoke-test/composer/vendor/composer/installed.json +57 -0
  46. data/smoke-test/composer/vendor/phpmailer/phpmailer/.gitignore +3 -0
  47. data/smoke-test/composer/vendor/phpmailer/phpmailer/LICENSE +504 -0
  48. data/smoke-test/composer/vendor/phpmailer/phpmailer/README.md +112 -0
  49. data/smoke-test/composer/vendor/phpmailer/phpmailer/changelog.md +530 -0
  50. data/smoke-test/composer/vendor/phpmailer/phpmailer/class.phpmailer.php +2758 -0
  51. data/smoke-test/composer/vendor/phpmailer/phpmailer/class.pop3.php +417 -0
  52. data/smoke-test/composer/vendor/phpmailer/phpmailer/class.smtp.php +1075 -0
  53. data/smoke-test/composer/vendor/phpmailer/phpmailer/composer.json +32 -0
  54. data/smoke-test/composer/vendor/phpmailer/phpmailer/docs/Callback_function_notes.txt +17 -0
  55. data/smoke-test/composer/vendor/phpmailer/phpmailer/docs/DomainKeys_notes.txt +55 -0
  56. data/smoke-test/composer/vendor/phpmailer/phpmailer/docs/Note_for_SMTP_debugging.txt +23 -0
  57. data/smoke-test/composer/vendor/phpmailer/phpmailer/docs/extending.html +148 -0
  58. data/smoke-test/composer/vendor/phpmailer/phpmailer/docs/faq.html +67 -0
  59. data/smoke-test/composer/vendor/phpmailer/phpmailer/docs/generatedocs.sh +4 -0
  60. data/smoke-test/composer/vendor/phpmailer/phpmailer/docs/pop3_article.txt +39 -0
  61. data/smoke-test/composer/vendor/phpmailer/phpmailer/docs/use_gmail.txt +44 -0
  62. data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/contents.html +20 -0
  63. data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/images/phpmailer.gif +0 -0
  64. data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/images/phpmailer_mini.gif +0 -0
  65. data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/index.html +50 -0
  66. data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/test_db_smtp_basic.php +58 -0
  67. data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/test_mail_advanced.php +30 -0
  68. data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/test_mail_basic.php +41 -0
  69. data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/test_pop_before_smtp_advanced.php +39 -0
  70. data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/test_pop_before_smtp_basic.php +49 -0
  71. data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/test_sendmail_advanced.php +33 -0
  72. data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/test_sendmail_basic.php +43 -0
  73. data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/test_smtp_advanced.php +42 -0
  74. data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/test_smtp_advanced_no_auth.php +36 -0
  75. data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/test_smtp_basic.php +58 -0
  76. data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/test_smtp_basic_no_auth.php +53 -0
  77. data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/test_smtp_gmail_advanced.php +42 -0
  78. data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/test_smtp_gmail_basic.php +59 -0
  79. data/smoke-test/composer/vendor/phpmailer/phpmailer/extras/class.html2text.inc +489 -0
  80. data/smoke-test/composer/vendor/phpmailer/phpmailer/extras/htmlfilter.php +861 -0
  81. data/smoke-test/composer/vendor/phpmailer/phpmailer/extras/ntlm_sasl_client.php +185 -0
  82. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ar.php +26 -0
  83. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-br.php +25 -0
  84. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ca.php +25 -0
  85. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ch.php +25 -0
  86. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-cz.php +24 -0
  87. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-de.php +24 -0
  88. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-dk.php +25 -0
  89. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-es.php +25 -0
  90. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-et.php +25 -0
  91. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-fi.php +26 -0
  92. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-fo.php +26 -0
  93. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-fr.php +24 -0
  94. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-hu.php +24 -0
  95. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-it.php +26 -0
  96. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ja.php +25 -0
  97. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-nl.php +24 -0
  98. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-no.php +24 -0
  99. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-pl.php +24 -0
  100. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ro.php +26 -0
  101. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ru.php +24 -0
  102. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-se.php +25 -0
  103. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-sk.php +25 -0
  104. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-tr.php +26 -0
  105. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-zh.php +25 -0
  106. data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-zh_cn.php +25 -0
  107. data/smoke-test/composer/vendor/phpmailer/phpmailer/test/contents.html +10 -0
  108. data/smoke-test/composer/vendor/phpmailer/phpmailer/test/phpmailerTest.php +1084 -0
  109. data/smoke-test/composer/vendor/phpmailer/phpmailer/test/test.png +0 -0
  110. data/smoke-test/composer/vendor/phpmailer/phpmailer/test/test_callback.php +84 -0
  111. data/smoke-test/composer/vendor/phpmailer/phpmailer/test/testemail.php +48 -0
  112. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/LGPLv3.txt +165 -0
  113. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/contents.html +14 -0
  114. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/images/aikido.gif +0 -0
  115. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/images/bkgrnd.gif +0 -0
  116. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/images/phpmailer.gif +0 -0
  117. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/index.php +427 -0
  118. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/clipboard.swf +0 -0
  119. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushBash.js +59 -0
  120. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushCSharp.js +64 -0
  121. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushCpp.js +99 -0
  122. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushCss.js +93 -0
  123. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushDelphi.js +57 -0
  124. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushDiff.js +43 -0
  125. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushGroovy.js +69 -0
  126. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushJScript.js +51 -0
  127. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushJava.js +55 -0
  128. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushPerl.js +74 -0
  129. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushPhp.js +91 -0
  130. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushPlain.js +35 -0
  131. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushPython.js +56 -0
  132. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushRuby.js +57 -0
  133. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushScala.js +53 -0
  134. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushSql.js +68 -0
  135. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushVb.js +58 -0
  136. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushXml.js +71 -0
  137. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shCore.js +30 -0
  138. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shLegacy.js +30 -0
  139. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/src/shCore.js +1949 -0
  140. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/src/shLegacy.js +172 -0
  141. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/styles/help.png +0 -0
  142. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/styles/magnifier.png +0 -0
  143. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/styles/page_white_code.png +0 -0
  144. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/styles/page_white_copy.png +0 -0
  145. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/styles/printer.png +0 -0
  146. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/styles/shCore.css +321 -0
  147. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/styles/shThemeDefault.css +191 -0
  148. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/styles/shThemeDjango.css +193 -0
  149. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/styles/shThemeEmacs.css +192 -0
  150. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/styles/shThemeFadeToGrey.css +193 -0
  151. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/styles/shThemeMidnight.css +192 -0
  152. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/styles/shThemeRDark.css +192 -0
  153. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/styles/wrapping.png +0 -0
  154. data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/test.html +46 -0
  155. data/smoke-test/dependabot-file/no-config/.github/TARGET.yaml +14 -0
  156. data/smoke-test/dependabot-file/no-config/bundler/Gemfile +9 -0
  157. data/smoke-test/dependabot-file/no-config/bundler/Gemfile.lock +47 -0
  158. data/smoke-test/dependabot-file/no-config/bundler/dependabot-all-updates-test-staging.gemspec +10 -0
  159. data/smoke-test/dependabot-file/no-config/cargo/Cargo.lock +90 -0
  160. data/smoke-test/dependabot-file/no-config/cargo/Cargo.toml +8 -0
  161. data/smoke-test/dependabot-file/no-config/composer/composer.json +5 -0
  162. data/smoke-test/dependabot-file/no-config/composer/composer.lock +72 -0
  163. data/smoke-test/dependabot-file/over-config/.github/TARGET.yaml +17 -0
  164. data/smoke-test/dependabot-file/over-config/.github/dependabot.yaml +12 -0
  165. data/smoke-test/dependabot-file/over-config/bundler/Gemfile +9 -0
  166. data/smoke-test/dependabot-file/over-config/bundler/Gemfile.lock +47 -0
  167. data/smoke-test/dependabot-file/over-config/bundler/dependabot-all-updates-test-staging.gemspec +10 -0
  168. data/smoke-test/dependabot-file/over-config/cargo/Cargo.lock +90 -0
  169. data/smoke-test/dependabot-file/over-config/cargo/Cargo.toml +8 -0
  170. data/smoke-test/dependabot-file/over-config/composer/composer.json +5 -0
  171. data/smoke-test/dependabot-file/over-config/composer/composer.lock +72 -0
  172. data/smoke-test/dependabot-file/overer-config/.github/TARGET.yaml +19 -0
  173. data/smoke-test/dependabot-file/overer-config/.github/dependabot.yaml +12 -0
  174. data/smoke-test/dependabot-file/overer-config/bundler/Gemfile +9 -0
  175. data/smoke-test/dependabot-file/overer-config/bundler/Gemfile.lock +47 -0
  176. data/smoke-test/dependabot-file/overer-config/bundler/dependabot-all-updates-test-staging.gemspec +10 -0
  177. data/smoke-test/dependabot-file/overer-config/cargo/Cargo.lock +90 -0
  178. data/smoke-test/dependabot-file/overer-config/cargo/Cargo.toml +8 -0
  179. data/smoke-test/dependabot-file/overer-config/composer/composer.json +5 -0
  180. data/smoke-test/dependabot-file/overer-config/composer/composer.lock +72 -0
  181. data/smoke-test/dependabot-file/partial-config/.github/TARGET.yaml +17 -0
  182. data/smoke-test/dependabot-file/partial-config/.github/dependabot.yaml +7 -0
  183. data/smoke-test/dependabot-file/partial-config/bundler/Gemfile +9 -0
  184. data/smoke-test/dependabot-file/partial-config/bundler/Gemfile.lock +47 -0
  185. data/smoke-test/dependabot-file/partial-config/bundler/dependabot-all-updates-test-staging.gemspec +10 -0
  186. data/smoke-test/dependabot-file/partial-config/cargo/Cargo.lock +90 -0
  187. data/smoke-test/dependabot-file/partial-config/cargo/Cargo.toml +8 -0
  188. data/smoke-test/dependabot-file/partial-config/composer/composer.json +5 -0
  189. data/smoke-test/dependabot-file/partial-config/composer/composer.lock +72 -0
  190. data/smoke-test/docker/Dockerfile +19 -0
  191. data/smoke-test/elm/elm-package.json +15 -0
  192. data/smoke-test/elm/elm.json +31 -0
  193. data/smoke-test/github-actions/both/.github/workflows/this.yaml +11 -0
  194. data/smoke-test/github-actions/both/yaml/action.yml +13 -0
  195. data/smoke-test/github-actions/invalid/invalid_file.yaml +0 -0
  196. data/smoke-test/github-actions/workflow/.github/workflows/this.yaml +11 -0
  197. data/smoke-test/github-actions/yaml/action.yml +13 -0
  198. data/smoke-test/gitsubmodule/.gitmodules +4 -0
  199. data/smoke-test/gomod/go.mod +16 -0
  200. data/smoke-test/gomod/go.sum +18 -0
  201. data/smoke-test/gomod/gomain.go +14 -0
  202. data/smoke-test/gradle/.gitignore +1 -0
  203. data/smoke-test/gradle/build.gradle +65 -0
  204. data/smoke-test/maven/pom.xml +65 -0
  205. data/smoke-test/mix/mix.exs +24 -0
  206. data/smoke-test/mix/mix.lock +5 -0
  207. data/smoke-test/npm/package-lock.json +166 -0
  208. data/smoke-test/npm/package.json +22 -0
  209. data/smoke-test/npm/removed/package-lock.json +44 -0
  210. data/smoke-test/npm/removed/package.json +15 -0
  211. data/smoke-test/nuget/project.csproj +14 -0
  212. data/smoke-test/pip/pip/requirements.txt +5 -0
  213. data/smoke-test/pip/pip-compile/requirements.in +2 -0
  214. data/smoke-test/pip/pip-compile/requirements.txt +16 -0
  215. data/smoke-test/pip/pipenv/Pipfile +13 -0
  216. data/smoke-test/pip/pipenv/Pipfile.lock +86 -0
  217. data/smoke-test/pip/poetry/poetry.lock +33 -0
  218. data/smoke-test/pip/poetry/pyproject.toml +18 -0
  219. data/smoke-test/pub/pubspec.lock +40 -0
  220. data/smoke-test/pub/pubspec.yaml +10 -0
  221. data/smoke-test/terraform/main.tf +143 -0
  222. metadata +314 -6
  223. data/LICENSE.GPL-3.0-only +0 -674
@@ -0,0 +1,39 @@
1
+ <html>
2
+ <head>
3
+ <title>POP before SMTP Test</title>
4
+ </head>
5
+ <body>
6
+
7
+ <?php
8
+ require_once('../class.phpmailer.php');
9
+ require_once('../class.pop3.php'); // required for POP before SMTP
10
+
11
+ $pop = new POP3();
12
+ $pop->Authorise('pop3.yourdomain.com', 110, 30, 'username', 'password', 1);
13
+
14
+ $mail = new PHPMailer(true); // the true param means it will throw exceptions on errors, which we need to catch
15
+
16
+ $mail->IsSMTP();
17
+
18
+ try {
19
+ $mail->SMTPDebug = 2;
20
+ $mail->Host = 'pop3.yourdomain.com';
21
+ $mail->AddAddress('whoto@otherdomain.com', 'John Doe');
22
+ $mail->SetFrom('name@yourdomain.com', 'First Last');
23
+ $mail->AddReplyTo('name@yourdomain.com', 'First Last');
24
+ $mail->Subject = 'PHPMailer Test Subject via mail(), advanced';
25
+ $mail->AltBody = 'To view the message, please use an HTML compatible email viewer!'; // optional - MsgHTML will create an alternate automatically
26
+ $mail->MsgHTML(file_get_contents('contents.html'));
27
+ $mail->AddAttachment('images/phpmailer.gif'); // attachment
28
+ $mail->AddAttachment('images/phpmailer_mini.gif'); // attachment
29
+ $mail->Send();
30
+ echo "Message Sent OK</p>\n";
31
+ } catch (phpmailerException $e) {
32
+ echo $e->errorMessage(); //Pretty error messages from PHPMailer
33
+ } catch (Exception $e) {
34
+ echo $e->getMessage(); //Boring error messages from anything else!
35
+ }
36
+ ?>
37
+
38
+ </body>
39
+ </html>
@@ -0,0 +1,49 @@
1
+ <html>
2
+ <head>
3
+ <title>POP before SMTP Test</title>
4
+ </head>
5
+ <body>
6
+
7
+ <?php
8
+ require_once('../class.phpmailer.php');
9
+ require_once('../class.pop3.php'); // required for POP before SMTP
10
+
11
+ $pop = new POP3();
12
+ $pop->Authorise('pop3.yourdomain.com', 110, 30, 'username', 'password', 1);
13
+
14
+ $mail = new PHPMailer();
15
+
16
+ $body = file_get_contents('contents.html');
17
+ $body = preg_replace('/[\]/','',$body);
18
+
19
+ $mail->IsSMTP();
20
+ $mail->SMTPDebug = 2;
21
+ $mail->Host = 'pop3.yourdomain.com';
22
+
23
+ $mail->SetFrom('name@yourdomain.com', 'First Last');
24
+
25
+ $mail->AddReplyTo("name@yourdomain.com","First Last");
26
+
27
+ $mail->Subject = "PHPMailer Test Subject via POP before SMTP, basic";
28
+
29
+ $mail->AltBody = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test
30
+
31
+ $mail->MsgHTML($body);
32
+
33
+ $address = "whoto@otherdomain.com";
34
+ $mail->AddAddress($address, "John Doe");
35
+
36
+ $mail->AddAttachment("images/phpmailer.gif"); // attachment
37
+ $mail->AddAttachment("images/phpmailer_mini.gif"); // attachment
38
+
39
+
40
+ if(!$mail->Send()) {
41
+ echo "Mailer Error: " . $mail->ErrorInfo;
42
+ } else {
43
+ echo "Message sent!";
44
+ }
45
+
46
+ ?>
47
+
48
+ </body>
49
+ </html>
@@ -0,0 +1,33 @@
1
+ <html>
2
+ <head>
3
+ <title>PHPMailer - Sendmail advanced test</title>
4
+ </head>
5
+ <body>
6
+
7
+ <?php
8
+
9
+ require_once('../class.phpmailer.php');
10
+
11
+ $mail = new PHPMailer(true); // the true param means it will throw exceptions on errors, which we need to catch
12
+ $mail->IsSendmail(); // telling the class to use SendMail transport
13
+
14
+ try {
15
+ $mail->AddAddress('whoto@otherdomain.com', 'John Doe');
16
+ $mail->SetFrom('name@yourdomain.com', 'First Last');
17
+ $mail->AddReplyTo('name@yourdomain.com', 'First Last');
18
+ $mail->Subject = 'PHPMailer Test Subject via mail(), advanced';
19
+ $mail->AltBody = 'To view the message, please use an HTML compatible email viewer!'; // optional - MsgHTML will create an alternate automatically
20
+ $mail->MsgHTML(file_get_contents('contents.html'));
21
+ $mail->AddAttachment('images/phpmailer.gif'); // attachment
22
+ $mail->AddAttachment('images/phpmailer_mini.gif'); // attachment
23
+ $mail->Send();
24
+ echo "Message Sent OK</p>\n";
25
+ } catch (phpmailerException $e) {
26
+ echo $e->errorMessage(); //Pretty error messages from PHPMailer
27
+ } catch (Exception $e) {
28
+ echo $e->getMessage(); //Boring error messages from anything else!
29
+ }
30
+ ?>
31
+
32
+ </body>
33
+ </html>
@@ -0,0 +1,43 @@
1
+ <html>
2
+ <head>
3
+ <title>PHPMailer - Sendmail basic test</title>
4
+ </head>
5
+ <body>
6
+
7
+ <?php
8
+
9
+ require_once('../class.phpmailer.php');
10
+
11
+ $mail = new PHPMailer(); // defaults to using php "mail()"
12
+
13
+ $mail->IsSendmail(); // telling the class to use SendMail transport
14
+
15
+ $body = file_get_contents('contents.html');
16
+ $body = preg_replace('/[\]/','',$body);
17
+
18
+ $mail->SetFrom('name@yourdomain.com', 'First Last');
19
+
20
+ $mail->AddReplyTo("name@yourdomain.com","First Last");
21
+
22
+ $address = "whoto@otherdomain.com";
23
+ $mail->AddAddress($address, "John Doe");
24
+
25
+ $mail->Subject = "PHPMailer Test Subject via Sendmail, basic";
26
+
27
+ $mail->AltBody = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test
28
+
29
+ $mail->MsgHTML($body);
30
+
31
+ $mail->AddAttachment("images/phpmailer.gif"); // attachment
32
+ $mail->AddAttachment("images/phpmailer_mini.gif"); // attachment
33
+
34
+ if(!$mail->Send()) {
35
+ echo "Mailer Error: " . $mail->ErrorInfo;
36
+ } else {
37
+ echo "Message sent!";
38
+ }
39
+
40
+ ?>
41
+
42
+ </body>
43
+ </html>
@@ -0,0 +1,42 @@
1
+ <html>
2
+ <head>
3
+ <title>PHPMailer - SMTP advanced test with authentication</title>
4
+ </head>
5
+ <body>
6
+
7
+ <?php
8
+
9
+ require_once('../class.phpmailer.php');
10
+ //include("class.smtp.php"); // optional, gets called from within class.phpmailer.php if not already loaded
11
+
12
+ $mail = new PHPMailer(true); // the true param means it will throw exceptions on errors, which we need to catch
13
+
14
+ $mail->IsSMTP(); // telling the class to use SMTP
15
+
16
+ try {
17
+ $mail->Host = "mail.yourdomain.com"; // SMTP server
18
+ $mail->SMTPDebug = 2; // enables SMTP debug information (for testing)
19
+ $mail->SMTPAuth = true; // enable SMTP authentication
20
+ $mail->Host = "mail.yourdomain.com"; // sets the SMTP server
21
+ $mail->Port = 26; // set the SMTP port for the GMAIL server
22
+ $mail->Username = "yourname@yourdomain"; // SMTP account username
23
+ $mail->Password = "yourpassword"; // SMTP account password
24
+ $mail->AddAddress('whoto@otherdomain.com', 'John Doe');
25
+ $mail->SetFrom('name@yourdomain.com', 'First Last');
26
+ $mail->AddReplyTo('name@yourdomain.com', 'First Last');
27
+ $mail->Subject = 'PHPMailer Test Subject via mail(), advanced';
28
+ $mail->AltBody = 'To view the message, please use an HTML compatible email viewer!'; // optional - MsgHTML will create an alternate automatically
29
+ $mail->MsgHTML(file_get_contents('contents.html'));
30
+ $mail->AddAttachment('images/phpmailer.gif'); // attachment
31
+ $mail->AddAttachment('images/phpmailer_mini.gif'); // attachment
32
+ $mail->Send();
33
+ echo "Message Sent OK</p>\n";
34
+ } catch (phpmailerException $e) {
35
+ echo $e->errorMessage(); //Pretty error messages from PHPMailer
36
+ } catch (Exception $e) {
37
+ echo $e->getMessage(); //Boring error messages from anything else!
38
+ }
39
+ ?>
40
+
41
+ </body>
42
+ </html>
@@ -0,0 +1,36 @@
1
+ <html>
2
+ <head>
3
+ <title>PHPMailer - SMTP advanced test with no authentication</title>
4
+ </head>
5
+ <body>
6
+
7
+ <?php
8
+ require_once('../class.phpmailer.php');
9
+ //include("class.smtp.php"); // optional, gets called from within class.phpmailer.php if not already loaded
10
+
11
+ $mail = new PHPMailer(true); // the true param means it will throw exceptions on errors, which we need to catch
12
+
13
+ $mail->IsSMTP(); // telling the class to use SMTP
14
+
15
+ try {
16
+ $mail->Host = "mail.yourdomain.com"; // SMTP server
17
+ $mail->SMTPDebug = 2; // enables SMTP debug information (for testing)
18
+ $mail->AddAddress('whoto@otherdomain.com', 'John Doe');
19
+ $mail->SetFrom('name@yourdomain.com', 'First Last');
20
+ $mail->AddReplyTo('name@yourdomain.com', 'First Last');
21
+ $mail->Subject = 'PHPMailer Test Subject via mail(), advanced';
22
+ $mail->AltBody = 'To view the message, please use an HTML compatible email viewer!'; // optional - MsgHTML will create an alternate automatically
23
+ $mail->MsgHTML(file_get_contents('contents.html'));
24
+ $mail->AddAttachment('images/phpmailer.gif'); // attachment
25
+ $mail->AddAttachment('images/phpmailer_mini.gif'); // attachment
26
+ $mail->Send();
27
+ echo "Message Sent OK</p>\n";
28
+ } catch (phpmailerException $e) {
29
+ echo $e->errorMessage(); //Pretty error messages from PHPMailer
30
+ } catch (Exception $e) {
31
+ echo $e->getMessage(); //Boring error messages from anything else!
32
+ }
33
+ ?>
34
+
35
+ </body>
36
+ </html>
@@ -0,0 +1,58 @@
1
+ <html>
2
+ <head>
3
+ <title>PHPMailer - SMTP basic test with authentication</title>
4
+ </head>
5
+ <body>
6
+
7
+ <?php
8
+
9
+ //error_reporting(E_ALL);
10
+ error_reporting(E_STRICT);
11
+
12
+ date_default_timezone_set('America/Toronto');
13
+
14
+ require_once('../class.phpmailer.php');
15
+ //include("class.smtp.php"); // optional, gets called from within class.phpmailer.php if not already loaded
16
+
17
+ $mail = new PHPMailer();
18
+
19
+ $body = file_get_contents('contents.html');
20
+ $body = preg_replace('/[\]/','',$body);
21
+
22
+ $mail->IsSMTP(); // telling the class to use SMTP
23
+ $mail->Host = "mail.yourdomain.com"; // SMTP server
24
+ $mail->SMTPDebug = 2; // enables SMTP debug information (for testing)
25
+ // 1 = errors and messages
26
+ // 2 = messages only
27
+ $mail->SMTPAuth = true; // enable SMTP authentication
28
+ $mail->Host = "mail.yourdomain.com"; // sets the SMTP server
29
+ $mail->Port = 26; // set the SMTP port for the GMAIL server
30
+ $mail->Username = "yourname@yourdomain"; // SMTP account username
31
+ $mail->Password = "yourpassword"; // SMTP account password
32
+
33
+ $mail->SetFrom('name@yourdomain.com', 'First Last');
34
+
35
+ $mail->AddReplyTo("name@yourdomain.com","First Last");
36
+
37
+ $mail->Subject = "PHPMailer Test Subject via smtp, basic with authentication";
38
+
39
+ $mail->AltBody = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test
40
+
41
+ $mail->MsgHTML($body);
42
+
43
+ $address = "whoto@otherdomain.com";
44
+ $mail->AddAddress($address, "John Doe");
45
+
46
+ $mail->AddAttachment("images/phpmailer.gif"); // attachment
47
+ $mail->AddAttachment("images/phpmailer_mini.gif"); // attachment
48
+
49
+ if(!$mail->Send()) {
50
+ echo "Mailer Error: " . $mail->ErrorInfo;
51
+ } else {
52
+ echo "Message sent!";
53
+ }
54
+
55
+ ?>
56
+
57
+ </body>
58
+ </html>
@@ -0,0 +1,53 @@
1
+ <html>
2
+ <head>
3
+ <title>PHPMailer - SMTP basic test with no authentication</title>
4
+ </head>
5
+ <body>
6
+
7
+ <?php
8
+
9
+ //error_reporting(E_ALL);
10
+ error_reporting(E_STRICT);
11
+
12
+ date_default_timezone_set('America/Toronto');
13
+
14
+ require_once('../class.phpmailer.php');
15
+ //include("class.smtp.php"); // optional, gets called from within class.phpmailer.php if not already loaded
16
+
17
+ $mail = new PHPMailer();
18
+
19
+ $body = file_get_contents('contents.html');
20
+ $body = preg_replace('/[\]/','',$body);
21
+
22
+ $mail->IsSMTP(); // telling the class to use SMTP
23
+ $mail->Host = "mail.yourdomain.com"; // SMTP server
24
+ $mail->SMTPDebug = 2; // enables SMTP debug information (for testing)
25
+ // 1 = errors and messages
26
+ // 2 = messages only
27
+
28
+ $mail->SetFrom('name@yourdomain.com', 'First Last');
29
+
30
+ $mail->AddReplyTo("name@yourdomain.com","First Last");
31
+
32
+ $mail->Subject = "PHPMailer Test Subject via smtp, basic with no authentication";
33
+
34
+ $mail->AltBody = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test
35
+
36
+ $mail->MsgHTML($body);
37
+
38
+ $address = "whoto@otherdomain.com";
39
+ $mail->AddAddress($address, "John Doe");
40
+
41
+ $mail->AddAttachment("images/phpmailer.gif"); // attachment
42
+ $mail->AddAttachment("images/phpmailer_mini.gif"); // attachment
43
+
44
+ if(!$mail->Send()) {
45
+ echo "Mailer Error: " . $mail->ErrorInfo;
46
+ } else {
47
+ echo "Message sent!";
48
+ }
49
+
50
+ ?>
51
+
52
+ </body>
53
+ </html>
@@ -0,0 +1,42 @@
1
+ <html>
2
+ <head>
3
+ <title>PHPMailer - SMTP (Gmail) advanced test</title>
4
+ </head>
5
+ <body>
6
+
7
+ <?php
8
+ require_once('../class.phpmailer.php');
9
+ //include("class.smtp.php"); // optional, gets called from within class.phpmailer.php if not already loaded
10
+
11
+ $mail = new PHPMailer(true); // the true param means it will throw exceptions on errors, which we need to catch
12
+
13
+ $mail->IsSMTP(); // telling the class to use SMTP
14
+
15
+ try {
16
+ $mail->Host = "mail.yourdomain.com"; // SMTP server
17
+ $mail->SMTPDebug = 2; // enables SMTP debug information (for testing)
18
+ $mail->SMTPAuth = true; // enable SMTP authentication
19
+ $mail->SMTPSecure = "ssl"; // sets the prefix to the servier
20
+ $mail->Host = "smtp.gmail.com"; // sets GMAIL as the SMTP server
21
+ $mail->Port = 465; // set the SMTP port for the GMAIL server
22
+ $mail->Username = "yourusername@gmail.com"; // GMAIL username
23
+ $mail->Password = "yourpassword"; // GMAIL password
24
+ $mail->AddAddress('whoto@otherdomain.com', 'John Doe');
25
+ $mail->SetFrom('name@yourdomain.com', 'First Last');
26
+ $mail->AddReplyTo('name@yourdomain.com', 'First Last');
27
+ $mail->Subject = 'PHPMailer Test Subject via mail(), advanced';
28
+ $mail->AltBody = 'To view the message, please use an HTML compatible email viewer!'; // optional - MsgHTML will create an alternate automatically
29
+ $mail->MsgHTML(file_get_contents('contents.html'));
30
+ $mail->AddAttachment('images/phpmailer.gif'); // attachment
31
+ $mail->AddAttachment('images/phpmailer_mini.gif'); // attachment
32
+ $mail->Send();
33
+ echo "Message Sent OK</p>\n";
34
+ } catch (phpmailerException $e) {
35
+ echo $e->errorMessage(); //Pretty error messages from PHPMailer
36
+ } catch (Exception $e) {
37
+ echo $e->getMessage(); //Boring error messages from anything else!
38
+ }
39
+ ?>
40
+
41
+ </body>
42
+ </html>
@@ -0,0 +1,59 @@
1
+ <html>
2
+ <head>
3
+ <title>PHPMailer - SMTP (Gmail) basic test</title>
4
+ </head>
5
+ <body>
6
+
7
+ <?php
8
+
9
+ //error_reporting(E_ALL);
10
+ error_reporting(E_STRICT);
11
+
12
+ date_default_timezone_set('America/Toronto');
13
+
14
+ require_once('../class.phpmailer.php');
15
+ //include("class.smtp.php"); // optional, gets called from within class.phpmailer.php if not already loaded
16
+
17
+ $mail = new PHPMailer();
18
+
19
+ $body = file_get_contents('contents.html');
20
+ $body = preg_replace('/[\]/','',$body);
21
+
22
+ $mail->IsSMTP(); // telling the class to use SMTP
23
+ $mail->Host = "mail.yourdomain.com"; // SMTP server
24
+ $mail->SMTPDebug = 2; // enables SMTP debug information (for testing)
25
+ // 1 = errors and messages
26
+ // 2 = messages only
27
+ $mail->SMTPAuth = true; // enable SMTP authentication
28
+ $mail->SMTPSecure = "ssl"; // sets the prefix to the servier
29
+ $mail->Host = "smtp.gmail.com"; // sets GMAIL as the SMTP server
30
+ $mail->Port = 465; // set the SMTP port for the GMAIL server
31
+ $mail->Username = "yourusername@gmail.com"; // GMAIL username
32
+ $mail->Password = "yourpassword"; // GMAIL password
33
+
34
+ $mail->SetFrom('name@yourdomain.com', 'First Last');
35
+
36
+ $mail->AddReplyTo("name@yourdomain.com","First Last");
37
+
38
+ $mail->Subject = "PHPMailer Test Subject via smtp (Gmail), basic";
39
+
40
+ $mail->AltBody = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test
41
+
42
+ $mail->MsgHTML($body);
43
+
44
+ $address = "whoto@otherdomain.com";
45
+ $mail->AddAddress($address, "John Doe");
46
+
47
+ $mail->AddAttachment("images/phpmailer.gif"); // attachment
48
+ $mail->AddAttachment("images/phpmailer_mini.gif"); // attachment
49
+
50
+ if(!$mail->Send()) {
51
+ echo "Mailer Error: " . $mail->ErrorInfo;
52
+ } else {
53
+ echo "Message sent!";
54
+ }
55
+
56
+ ?>
57
+
58
+ </body>
59
+ </html>