create-berna-stencil 1.0.9 → 1.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (365) hide show
  1. package/.env.example +8 -0
  2. package/.gitignore +2 -1
  3. package/README.md +1 -5
  4. package/bin/create.js +2 -1
  5. package/package.json +71 -70
  6. package/src/api/vendor/autoload.php +22 -22
  7. package/src/api/vendor/composer/ClassLoader.php +579 -579
  8. package/src/api/vendor/composer/InstalledVersions.php +396 -396
  9. package/src/api/vendor/composer/LICENSE +21 -21
  10. package/src/api/vendor/composer/autoload_classmap.php +15 -15
  11. package/src/api/vendor/composer/autoload_files.php +12 -12
  12. package/src/api/vendor/composer/autoload_namespaces.php +9 -9
  13. package/src/api/vendor/composer/autoload_psr4.php +16 -16
  14. package/src/api/vendor/composer/autoload_real.php +50 -50
  15. package/src/api/vendor/composer/autoload_static.php +86 -86
  16. package/src/api/vendor/composer/installed.json +582 -582
  17. package/src/api/vendor/composer/installed.php +86 -86
  18. package/src/api/vendor/composer/platform_check.php +25 -25
  19. package/src/api/vendor/graham-campbell/result-type/.gitattributes +9 -0
  20. package/src/api/vendor/graham-campbell/result-type/.github/CODE_OF_CONDUCT.md +132 -0
  21. package/src/api/vendor/graham-campbell/result-type/.github/CONTRIBUTING.md +31 -0
  22. package/src/api/vendor/graham-campbell/result-type/.github/FUNDING.yml +2 -0
  23. package/src/api/vendor/graham-campbell/result-type/.github/SECURITY.md +14 -0
  24. package/src/api/vendor/graham-campbell/result-type/.github/workflows/stale.yml +11 -0
  25. package/src/api/vendor/graham-campbell/result-type/.github/workflows/tests.yml +40 -0
  26. package/src/api/vendor/graham-campbell/result-type/CHANGELOG.md +53 -0
  27. package/src/api/vendor/graham-campbell/result-type/LICENSE +21 -0
  28. package/src/api/vendor/graham-campbell/result-type/README.md +42 -0
  29. package/src/api/vendor/graham-campbell/result-type/composer.json +33 -0
  30. package/src/api/vendor/graham-campbell/result-type/phpunit.xml.dist +13 -0
  31. package/src/api/vendor/graham-campbell/result-type/src/Error.php +121 -0
  32. package/src/api/vendor/graham-campbell/result-type/src/Result.php +69 -0
  33. package/src/api/vendor/graham-campbell/result-type/src/Success.php +120 -0
  34. package/src/api/vendor/graham-campbell/result-type/tests/ResultTest.php +95 -0
  35. package/src/api/vendor/phpmailer/phpmailer/.codecov.yml +21 -0
  36. package/src/api/vendor/phpmailer/phpmailer/.editorconfig +15 -0
  37. package/src/api/vendor/phpmailer/phpmailer/.gitattributes +17 -0
  38. package/src/api/vendor/phpmailer/phpmailer/.github/FUNDING.yml +6 -0
  39. package/src/api/vendor/phpmailer/phpmailer/.github/ISSUE_TEMPLATE/bug_report.md +23 -0
  40. package/src/api/vendor/phpmailer/phpmailer/.github/actions/build-docs/Dockerfile +15 -0
  41. package/src/api/vendor/phpmailer/phpmailer/.github/actions/build-docs/entrypoint.sh +5 -0
  42. package/src/api/vendor/phpmailer/phpmailer/.github/dependabot.yml +21 -0
  43. package/src/api/vendor/phpmailer/phpmailer/.github/workflows/docs.yaml +30 -0
  44. package/src/api/vendor/phpmailer/phpmailer/.github/workflows/scorecards.yml +61 -0
  45. package/src/api/vendor/phpmailer/phpmailer/.github/workflows/tests.yml +237 -0
  46. package/src/api/vendor/phpmailer/phpmailer/.phan/config.php +41 -0
  47. package/src/api/vendor/phpmailer/phpmailer/COMMITMENT +46 -0
  48. package/src/api/vendor/phpmailer/phpmailer/LICENSE +502 -0
  49. package/src/api/vendor/phpmailer/phpmailer/README.md +232 -0
  50. package/src/api/vendor/phpmailer/phpmailer/SECURITY.md +37 -0
  51. package/src/api/vendor/phpmailer/phpmailer/SMTPUTF8.md +48 -0
  52. package/src/api/vendor/phpmailer/phpmailer/UPGRADING.md +125 -0
  53. package/src/api/vendor/phpmailer/phpmailer/VERSION +1 -0
  54. package/src/api/vendor/phpmailer/phpmailer/changelog.md +1122 -0
  55. package/src/api/vendor/phpmailer/phpmailer/composer.json +84 -0
  56. package/src/api/vendor/phpmailer/phpmailer/docs/README.md +9 -0
  57. package/src/api/vendor/phpmailer/phpmailer/examples/DKIM_gen_keys.phps +81 -0
  58. package/src/api/vendor/phpmailer/phpmailer/examples/DKIM_sign.phps +46 -0
  59. package/src/api/vendor/phpmailer/phpmailer/examples/README.md +96 -0
  60. package/src/api/vendor/phpmailer/phpmailer/examples/azure_xoauth2.phps +126 -0
  61. package/src/api/vendor/phpmailer/phpmailer/examples/callback.phps +76 -0
  62. package/src/api/vendor/phpmailer/phpmailer/examples/contactform-ajax.phps +146 -0
  63. package/src/api/vendor/phpmailer/phpmailer/examples/contactform.phps +95 -0
  64. package/src/api/vendor/phpmailer/phpmailer/examples/contents.html +17 -0
  65. package/src/api/vendor/phpmailer/phpmailer/examples/contentsutf8.html +23 -0
  66. package/src/api/vendor/phpmailer/phpmailer/examples/exceptions.phps +40 -0
  67. package/src/api/vendor/phpmailer/phpmailer/examples/extending.phps +72 -0
  68. package/src/api/vendor/phpmailer/phpmailer/examples/gmail.phps +106 -0
  69. package/src/api/vendor/phpmailer/phpmailer/examples/gmail_xoauth.phps +121 -0
  70. package/src/api/vendor/phpmailer/phpmailer/examples/images/PHPMailer card logo.afdesign +0 -0
  71. package/src/api/vendor/phpmailer/phpmailer/examples/images/PHPMailer card logo.png +0 -0
  72. package/src/api/vendor/phpmailer/phpmailer/examples/images/PHPMailer card logo.svg +209 -0
  73. package/src/api/vendor/phpmailer/phpmailer/examples/images/phpmailer.png +0 -0
  74. package/src/api/vendor/phpmailer/phpmailer/examples/images/phpmailer_mini.png +0 -0
  75. package/src/api/vendor/phpmailer/phpmailer/examples/mail.phps +35 -0
  76. package/src/api/vendor/phpmailer/phpmailer/examples/mailing_list.phps +96 -0
  77. package/src/api/vendor/phpmailer/phpmailer/examples/pop_before_smtp.phps +60 -0
  78. package/src/api/vendor/phpmailer/phpmailer/examples/send_file_upload.phps +60 -0
  79. package/src/api/vendor/phpmailer/phpmailer/examples/send_multiple_file_upload.phps +60 -0
  80. package/src/api/vendor/phpmailer/phpmailer/examples/sendmail.phps +37 -0
  81. package/src/api/vendor/phpmailer/phpmailer/examples/sendoauth2.phps +100 -0
  82. package/src/api/vendor/phpmailer/phpmailer/examples/simple_contact_form.phps +102 -0
  83. package/src/api/vendor/phpmailer/phpmailer/examples/smime_signed_mail.phps +99 -0
  84. package/src/api/vendor/phpmailer/phpmailer/examples/smtp.phps +62 -0
  85. package/src/api/vendor/phpmailer/phpmailer/examples/smtp_check.phps +60 -0
  86. package/src/api/vendor/phpmailer/phpmailer/examples/smtp_low_memory.phps +117 -0
  87. package/src/api/vendor/phpmailer/phpmailer/examples/smtp_no_auth.phps +53 -0
  88. package/src/api/vendor/phpmailer/phpmailer/examples/ssl_options.phps +81 -0
  89. package/src/api/vendor/phpmailer/phpmailer/get_oauth_token.php +182 -0
  90. package/src/api/vendor/phpmailer/phpmailer/language/phpmailer.lang-af.php +26 -0
  91. package/src/api/vendor/phpmailer/phpmailer/language/phpmailer.lang-ar.php +27 -0
  92. package/src/api/vendor/phpmailer/phpmailer/language/phpmailer.lang-as.php +35 -0
  93. package/src/api/vendor/phpmailer/phpmailer/language/phpmailer.lang-az.php +27 -0
  94. package/src/api/vendor/phpmailer/phpmailer/language/phpmailer.lang-ba.php +27 -0
  95. package/src/api/vendor/phpmailer/phpmailer/language/phpmailer.lang-be.php +27 -0
  96. package/src/api/vendor/phpmailer/phpmailer/language/phpmailer.lang-bg.php +27 -0
  97. package/src/api/vendor/phpmailer/phpmailer/language/phpmailer.lang-bn.php +35 -0
  98. package/src/api/vendor/phpmailer/phpmailer/language/phpmailer.lang-ca.php +27 -0
  99. package/src/api/vendor/phpmailer/phpmailer/language/phpmailer.lang-cs.php +28 -0
  100. package/src/api/vendor/phpmailer/phpmailer/language/phpmailer.lang-da.php +39 -0
  101. package/src/api/vendor/phpmailer/phpmailer/language/phpmailer.lang-de.php +28 -0
  102. package/src/api/vendor/phpmailer/phpmailer/language/phpmailer.lang-el.php +33 -0
  103. package/src/api/vendor/phpmailer/phpmailer/language/phpmailer.lang-eo.php +37 -0
  104. package/src/api/vendor/phpmailer/phpmailer/language/phpmailer.lang-es.php +38 -0
  105. package/src/api/vendor/phpmailer/phpmailer/language/phpmailer.lang-et.php +28 -0
  106. package/src/api/vendor/phpmailer/phpmailer/language/phpmailer.lang-fa.php +28 -0
  107. package/src/api/vendor/phpmailer/phpmailer/language/phpmailer.lang-fi.php +27 -0
  108. package/src/api/vendor/phpmailer/phpmailer/language/phpmailer.lang-fo.php +27 -0
  109. package/src/api/vendor/phpmailer/phpmailer/language/phpmailer.lang-fr.php +36 -0
  110. package/src/api/vendor/phpmailer/phpmailer/language/phpmailer.lang-gl.php +27 -0
  111. package/src/api/vendor/phpmailer/phpmailer/language/phpmailer.lang-he.php +27 -0
  112. package/src/api/vendor/phpmailer/phpmailer/language/phpmailer.lang-hi.php +35 -0
  113. package/src/api/vendor/phpmailer/phpmailer/language/phpmailer.lang-hr.php +27 -0
  114. package/src/api/vendor/phpmailer/phpmailer/language/phpmailer.lang-hu.php +27 -0
  115. package/src/api/vendor/phpmailer/phpmailer/language/phpmailer.lang-hy.php +27 -0
  116. package/src/api/vendor/phpmailer/phpmailer/language/phpmailer.lang-id.php +31 -0
  117. package/src/api/vendor/phpmailer/phpmailer/language/phpmailer.lang-it.php +28 -0
  118. package/src/api/vendor/phpmailer/phpmailer/language/phpmailer.lang-ja.php +37 -0
  119. package/src/api/vendor/phpmailer/phpmailer/language/phpmailer.lang-ka.php +27 -0
  120. package/src/api/vendor/phpmailer/phpmailer/language/phpmailer.lang-ko.php +27 -0
  121. package/src/api/vendor/phpmailer/phpmailer/language/phpmailer.lang-ku.php +27 -0
  122. package/src/api/vendor/phpmailer/phpmailer/language/phpmailer.lang-lt.php +27 -0
  123. package/src/api/vendor/phpmailer/phpmailer/language/phpmailer.lang-lv.php +27 -0
  124. package/src/api/vendor/phpmailer/phpmailer/language/phpmailer.lang-mg.php +27 -0
  125. package/src/api/vendor/phpmailer/phpmailer/language/phpmailer.lang-mn.php +27 -0
  126. package/src/api/vendor/phpmailer/phpmailer/language/phpmailer.lang-ms.php +27 -0
  127. package/src/api/vendor/phpmailer/phpmailer/language/phpmailer.lang-nb.php +37 -0
  128. package/src/api/vendor/phpmailer/phpmailer/language/phpmailer.lang-nl.php +38 -0
  129. package/src/api/vendor/phpmailer/phpmailer/language/phpmailer.lang-pl.php +33 -0
  130. package/src/api/vendor/phpmailer/phpmailer/language/phpmailer.lang-pt.php +34 -0
  131. package/src/api/vendor/phpmailer/phpmailer/language/phpmailer.lang-pt_br.php +38 -0
  132. package/src/api/vendor/phpmailer/phpmailer/language/phpmailer.lang-ro.php +33 -0
  133. package/src/api/vendor/phpmailer/phpmailer/language/phpmailer.lang-ru.php +36 -0
  134. package/src/api/vendor/phpmailer/phpmailer/language/phpmailer.lang-si.php +34 -0
  135. package/src/api/vendor/phpmailer/phpmailer/language/phpmailer.lang-sk.php +30 -0
  136. package/src/api/vendor/phpmailer/phpmailer/language/phpmailer.lang-sl.php +36 -0
  137. package/src/api/vendor/phpmailer/phpmailer/language/phpmailer.lang-sr.php +28 -0
  138. package/src/api/vendor/phpmailer/phpmailer/language/phpmailer.lang-sr_latn.php +28 -0
  139. package/src/api/vendor/phpmailer/phpmailer/language/phpmailer.lang-sv.php +27 -0
  140. package/src/api/vendor/phpmailer/phpmailer/language/phpmailer.lang-tl.php +28 -0
  141. package/src/api/vendor/phpmailer/phpmailer/language/phpmailer.lang-tr.php +38 -0
  142. package/src/api/vendor/phpmailer/phpmailer/language/phpmailer.lang-uk.php +28 -0
  143. package/src/api/vendor/phpmailer/phpmailer/language/phpmailer.lang-ur.php +30 -0
  144. package/src/api/vendor/phpmailer/phpmailer/language/phpmailer.lang-vi.php +27 -0
  145. package/src/api/vendor/phpmailer/phpmailer/language/phpmailer.lang-zh.php +29 -0
  146. package/src/api/vendor/phpmailer/phpmailer/language/phpmailer.lang-zh_cn.php +36 -0
  147. package/src/api/vendor/phpmailer/phpmailer/phpcs.xml.dist +52 -0
  148. package/src/api/vendor/phpmailer/phpmailer/phpdoc.dist.xml +20 -0
  149. package/src/api/vendor/phpmailer/phpmailer/phpunit.xml.dist +36 -0
  150. package/src/api/vendor/phpmailer/phpmailer/src/DSNConfigurator.php +245 -0
  151. package/src/api/vendor/phpmailer/phpmailer/src/Exception.php +40 -0
  152. package/src/api/vendor/phpmailer/phpmailer/src/OAuth.php +139 -0
  153. package/src/api/vendor/phpmailer/phpmailer/src/OAuthTokenProvider.php +44 -0
  154. package/src/api/vendor/phpmailer/phpmailer/src/PHPMailer.php +5525 -0
  155. package/src/api/vendor/phpmailer/phpmailer/src/POP3.php +470 -0
  156. package/src/api/vendor/phpmailer/phpmailer/src/SMTP.php +1617 -0
  157. package/src/api/vendor/phpmailer/phpmailer/test/DebugLogTestListener.php +47 -0
  158. package/src/api/vendor/phpmailer/phpmailer/test/Fixtures/FileIsAccessibleTest/accessible.txt +1 -0
  159. package/src/api/vendor/phpmailer/phpmailer/test/Fixtures/FileIsAccessibleTest/inaccessible.txt +1 -0
  160. package/src/api/vendor/phpmailer/phpmailer/test/Fixtures/LocalizationTest/phpmailer.lang-fr.php +10 -0
  161. package/src/api/vendor/phpmailer/phpmailer/test/Fixtures/LocalizationTest/phpmailer.lang-nl.php +10 -0
  162. package/src/api/vendor/phpmailer/phpmailer/test/Fixtures/LocalizationTest/phpmailer.lang-xa_scri_cc.php +9 -0
  163. package/src/api/vendor/phpmailer/phpmailer/test/Fixtures/LocalizationTest/phpmailer.lang-xb_scri.php +9 -0
  164. package/src/api/vendor/phpmailer/phpmailer/test/Fixtures/LocalizationTest/phpmailer.lang-xc_cc.php +9 -0
  165. package/src/api/vendor/phpmailer/phpmailer/test/Fixtures/LocalizationTest/phpmailer.lang-xd_cc.php +9 -0
  166. package/src/api/vendor/phpmailer/phpmailer/test/Fixtures/LocalizationTest/phpmailer.lang-xd_scri.php +9 -0
  167. package/src/api/vendor/phpmailer/phpmailer/test/Fixtures/LocalizationTest/phpmailer.lang-xe.php +9 -0
  168. package/src/api/vendor/phpmailer/phpmailer/test/Fixtures/LocalizationTest/phpmailer.lang-xx.php +9 -0
  169. package/src/api/vendor/phpmailer/phpmailer/test/Fixtures/LocalizationTest/phpmailer.lang-yy.php +16 -0
  170. package/src/api/vendor/phpmailer/phpmailer/test/Fixtures/LocalizationTest/phpmailer.lang-yz.php +16 -0
  171. package/src/api/vendor/phpmailer/phpmailer/test/Fixtures/LocalizationTest/phpmailer.lang-zz.php +20 -0
  172. package/src/api/vendor/phpmailer/phpmailer/test/Language/TranslationCompletenessTest.php +97 -0
  173. package/src/api/vendor/phpmailer/phpmailer/test/OAuth/OAuthTest.php +76 -0
  174. package/src/api/vendor/phpmailer/phpmailer/test/PHPMailer/AddEmbeddedImageTest.php +178 -0
  175. package/src/api/vendor/phpmailer/phpmailer/test/PHPMailer/AddStringAttachmentTest.php +147 -0
  176. package/src/api/vendor/phpmailer/phpmailer/test/PHPMailer/AddStringEmbeddedImageTest.php +161 -0
  177. package/src/api/vendor/phpmailer/phpmailer/test/PHPMailer/AddrFormatTest.php +70 -0
  178. package/src/api/vendor/phpmailer/phpmailer/test/PHPMailer/AuthCRAMMD5Test.php +48 -0
  179. package/src/api/vendor/phpmailer/phpmailer/test/PHPMailer/CustomHeaderTest.php +285 -0
  180. package/src/api/vendor/phpmailer/phpmailer/test/PHPMailer/DKIMTest.php +258 -0
  181. package/src/api/vendor/phpmailer/phpmailer/test/PHPMailer/DKIMWithoutExceptionsTest.php +46 -0
  182. package/src/api/vendor/phpmailer/phpmailer/test/PHPMailer/DSNConfiguratorTest.php +221 -0
  183. package/src/api/vendor/phpmailer/phpmailer/test/PHPMailer/EncodeQTest.php +110 -0
  184. package/src/api/vendor/phpmailer/phpmailer/test/PHPMailer/EncodeStringTest.php +135 -0
  185. package/src/api/vendor/phpmailer/phpmailer/test/PHPMailer/FileIsAccessibleTest.php +103 -0
  186. package/src/api/vendor/phpmailer/phpmailer/test/PHPMailer/FilenameToTypeTest.php +74 -0
  187. package/src/api/vendor/phpmailer/phpmailer/test/PHPMailer/GenerateIdTest.php +75 -0
  188. package/src/api/vendor/phpmailer/phpmailer/test/PHPMailer/GetLastMessageIDTest.php +110 -0
  189. package/src/api/vendor/phpmailer/phpmailer/test/PHPMailer/HasLineLongerThanMaxTest.php +158 -0
  190. package/src/api/vendor/phpmailer/phpmailer/test/PHPMailer/Html2TextTest.php +231 -0
  191. package/src/api/vendor/phpmailer/phpmailer/test/PHPMailer/ICalTest.php +126 -0
  192. package/src/api/vendor/phpmailer/phpmailer/test/PHPMailer/IsPermittedPathTest.php +108 -0
  193. package/src/api/vendor/phpmailer/phpmailer/test/PHPMailer/IsValidHostTest.php +107 -0
  194. package/src/api/vendor/phpmailer/phpmailer/test/PHPMailer/LocalizationTest.php +505 -0
  195. package/src/api/vendor/phpmailer/phpmailer/test/PHPMailer/MailTransportTest.php +261 -0
  196. package/src/api/vendor/phpmailer/phpmailer/test/PHPMailer/MbPathinfoTest.php +171 -0
  197. package/src/api/vendor/phpmailer/phpmailer/test/PHPMailer/MimeTypesTest.php +70 -0
  198. package/src/api/vendor/phpmailer/phpmailer/test/PHPMailer/NormalizeBreaksTest.php +111 -0
  199. package/src/api/vendor/phpmailer/phpmailer/test/PHPMailer/PHPMailerTest.php +1388 -0
  200. package/src/api/vendor/phpmailer/phpmailer/test/PHPMailer/ParseAddressesTest.php +321 -0
  201. package/src/api/vendor/phpmailer/phpmailer/test/PHPMailer/PunyencodeAddressTest.php +141 -0
  202. package/src/api/vendor/phpmailer/phpmailer/test/PHPMailer/QuotedStringTest.php +70 -0
  203. package/src/api/vendor/phpmailer/phpmailer/test/PHPMailer/ReplyToGetSetClearTest.php +444 -0
  204. package/src/api/vendor/phpmailer/phpmailer/test/PHPMailer/SetErrorTest.php +154 -0
  205. package/src/api/vendor/phpmailer/phpmailer/test/PHPMailer/SetFromTest.php +202 -0
  206. package/src/api/vendor/phpmailer/phpmailer/test/PHPMailer/SetTest.php +81 -0
  207. package/src/api/vendor/phpmailer/phpmailer/test/PHPMailer/SetWordWrapTest.php +120 -0
  208. package/src/api/vendor/phpmailer/phpmailer/test/PHPMailer/Utf8CharBoundaryTest.php +66 -0
  209. package/src/api/vendor/phpmailer/phpmailer/test/PHPMailer/ValidateAddressCustomValidatorTest.php +116 -0
  210. package/src/api/vendor/phpmailer/phpmailer/test/PHPMailer/ValidateAddressTest.php +485 -0
  211. package/src/api/vendor/phpmailer/phpmailer/test/PHPMailer/WrapTextTest.php +125 -0
  212. package/src/api/vendor/phpmailer/phpmailer/test/PHPMailer/XMailerTest.php +75 -0
  213. package/src/api/vendor/phpmailer/phpmailer/test/POP3/PopBeforeSmtpTest.php +139 -0
  214. package/src/api/vendor/phpmailer/phpmailer/test/PreSendTestCase.php +46 -0
  215. package/src/api/vendor/phpmailer/phpmailer/test/Security/DenialOfServiceVectorsTest.php +52 -0
  216. package/src/api/vendor/phpmailer/phpmailer/test/SendTestCase.php +126 -0
  217. package/src/api/vendor/phpmailer/phpmailer/test/TestCase.php +392 -0
  218. package/src/api/vendor/phpmailer/phpmailer/test/fakepopserver.sh +126 -0
  219. package/src/api/vendor/phpmailer/phpmailer/test/fakesendmail.sh +22 -0
  220. package/src/api/vendor/phpmailer/phpmailer/test/runfakepopserver.sh +12 -0
  221. package/src/api/vendor/phpmailer/phpmailer/test/testbootstrap-dist.php +8 -0
  222. package/src/api/vendor/phpmailer/phpmailer/test/validators.php +12 -0
  223. package/src/api/vendor/phpoption/phpoption/.gitattributes +13 -0
  224. package/src/api/vendor/phpoption/phpoption/.github/CODE_OF_CONDUCT.md +132 -0
  225. package/src/api/vendor/phpoption/phpoption/.github/CONTRIBUTING.md +30 -0
  226. package/src/api/vendor/phpoption/phpoption/.github/FUNDING.yml +2 -0
  227. package/src/api/vendor/phpoption/phpoption/.github/SECURITY.md +14 -0
  228. package/src/api/vendor/phpoption/phpoption/.github/workflows/static.yml +40 -0
  229. package/src/api/vendor/phpoption/phpoption/.github/workflows/tests.yml +40 -0
  230. package/src/api/vendor/phpoption/phpoption/LICENSE +201 -0
  231. package/src/api/vendor/phpoption/phpoption/Makefile +17 -0
  232. package/src/api/vendor/phpoption/phpoption/README.md +201 -0
  233. package/src/api/vendor/phpoption/phpoption/composer.json +50 -0
  234. package/src/api/vendor/phpoption/phpoption/phpstan-baseline.neon +44 -0
  235. package/src/api/vendor/phpoption/phpoption/phpstan.neon.dist +7 -0
  236. package/src/api/vendor/phpoption/phpoption/phpunit.xml.dist +13 -0
  237. package/src/api/vendor/phpoption/phpoption/src/PhpOption/LazyOption.php +175 -0
  238. package/src/api/vendor/phpoption/phpoption/src/PhpOption/None.php +136 -0
  239. package/src/api/vendor/phpoption/phpoption/src/PhpOption/Option.php +434 -0
  240. package/src/api/vendor/phpoption/phpoption/src/PhpOption/Some.php +169 -0
  241. package/src/api/vendor/phpoption/phpoption/tests/PhpOption/Tests/EnsureTest.php +72 -0
  242. package/src/api/vendor/phpoption/phpoption/tests/PhpOption/Tests/LazyOptionTest.php +357 -0
  243. package/src/api/vendor/phpoption/phpoption/tests/PhpOption/Tests/NoneTest.php +153 -0
  244. package/src/api/vendor/phpoption/phpoption/tests/PhpOption/Tests/OptionTest.php +166 -0
  245. package/src/api/vendor/phpoption/phpoption/tests/PhpOption/Tests/SomeTest.php +194 -0
  246. package/src/api/vendor/phpoption/phpoption/tests/bootstrap.php +8 -0
  247. package/src/api/vendor/phpoption/phpoption/vendor-bin/phpstan/composer.json +8 -0
  248. package/src/api/vendor/symfony/polyfill-ctype/Ctype.php +232 -0
  249. package/src/api/vendor/symfony/polyfill-ctype/LICENSE +19 -0
  250. package/src/api/vendor/symfony/polyfill-ctype/README.md +12 -0
  251. package/src/api/vendor/symfony/polyfill-ctype/bootstrap.php +50 -0
  252. package/src/api/vendor/symfony/polyfill-ctype/bootstrap80.php +46 -0
  253. package/src/api/vendor/symfony/polyfill-ctype/composer.json +38 -0
  254. package/src/api/vendor/symfony/polyfill-mbstring/LICENSE +19 -0
  255. package/src/api/vendor/symfony/polyfill-mbstring/Mbstring.php +1077 -0
  256. package/src/api/vendor/symfony/polyfill-mbstring/README.md +13 -0
  257. package/src/api/vendor/symfony/polyfill-mbstring/Resources/unidata/caseFolding.php +119 -0
  258. package/src/api/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php +1397 -0
  259. package/src/api/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php +5 -0
  260. package/src/api/vendor/symfony/polyfill-mbstring/Resources/unidata/upperCase.php +1489 -0
  261. package/src/api/vendor/symfony/polyfill-mbstring/bootstrap.php +171 -0
  262. package/src/api/vendor/symfony/polyfill-mbstring/bootstrap80.php +167 -0
  263. package/src/api/vendor/symfony/polyfill-mbstring/composer.json +39 -0
  264. package/src/api/vendor/symfony/polyfill-php80/LICENSE +19 -0
  265. package/src/api/vendor/symfony/polyfill-php80/Php80.php +115 -0
  266. package/src/api/vendor/symfony/polyfill-php80/PhpToken.php +106 -0
  267. package/src/api/vendor/symfony/polyfill-php80/README.md +25 -0
  268. package/src/api/vendor/symfony/polyfill-php80/Resources/stubs/Attribute.php +31 -0
  269. package/src/api/vendor/symfony/polyfill-php80/Resources/stubs/PhpToken.php +16 -0
  270. package/src/api/vendor/symfony/polyfill-php80/Resources/stubs/Stringable.php +20 -0
  271. package/src/api/vendor/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php +16 -0
  272. package/src/api/vendor/symfony/polyfill-php80/Resources/stubs/ValueError.php +16 -0
  273. package/src/api/vendor/symfony/polyfill-php80/bootstrap.php +42 -0
  274. package/src/api/vendor/symfony/polyfill-php80/composer.json +37 -0
  275. package/src/api/vendor/vlucas/phpdotenv/.editorconfig +15 -0
  276. package/src/api/vendor/vlucas/phpdotenv/.gitattributes +15 -0
  277. package/src/api/vendor/vlucas/phpdotenv/.github/CODE_OF_CONDUCT.md +132 -0
  278. package/src/api/vendor/vlucas/phpdotenv/.github/CONTRIBUTING.md +30 -0
  279. package/src/api/vendor/vlucas/phpdotenv/.github/FUNDING.yml +2 -0
  280. package/src/api/vendor/vlucas/phpdotenv/.github/SECURITY.md +14 -0
  281. package/src/api/vendor/vlucas/phpdotenv/.github/workflows/static.yml +40 -0
  282. package/src/api/vendor/vlucas/phpdotenv/.github/workflows/tests.yml +70 -0
  283. package/src/api/vendor/vlucas/phpdotenv/LICENSE +30 -0
  284. package/src/api/vendor/vlucas/phpdotenv/Makefile +17 -0
  285. package/src/api/vendor/vlucas/phpdotenv/README.md +370 -0
  286. package/src/api/vendor/vlucas/phpdotenv/UPGRADING.md +196 -0
  287. package/src/api/vendor/vlucas/phpdotenv/composer.json +60 -0
  288. package/src/api/vendor/vlucas/phpdotenv/phpstan-baseline.neon +157 -0
  289. package/src/api/vendor/vlucas/phpdotenv/phpstan.neon.dist +7 -0
  290. package/src/api/vendor/vlucas/phpdotenv/phpunit.xml.dist +13 -0
  291. package/src/api/vendor/vlucas/phpdotenv/src/Dotenv.php +267 -0
  292. package/src/api/vendor/vlucas/phpdotenv/src/Exception/ExceptionInterface.php +12 -0
  293. package/src/api/vendor/vlucas/phpdotenv/src/Exception/InvalidEncodingException.php +12 -0
  294. package/src/api/vendor/vlucas/phpdotenv/src/Exception/InvalidFileException.php +12 -0
  295. package/src/api/vendor/vlucas/phpdotenv/src/Exception/InvalidPathException.php +12 -0
  296. package/src/api/vendor/vlucas/phpdotenv/src/Exception/ValidationException.php +12 -0
  297. package/src/api/vendor/vlucas/phpdotenv/src/Loader/Loader.php +48 -0
  298. package/src/api/vendor/vlucas/phpdotenv/src/Loader/LoaderInterface.php +20 -0
  299. package/src/api/vendor/vlucas/phpdotenv/src/Loader/Resolver.php +65 -0
  300. package/src/api/vendor/vlucas/phpdotenv/src/Parser/Entry.php +59 -0
  301. package/src/api/vendor/vlucas/phpdotenv/src/Parser/EntryParser.php +299 -0
  302. package/src/api/vendor/vlucas/phpdotenv/src/Parser/Lexer.php +58 -0
  303. package/src/api/vendor/vlucas/phpdotenv/src/Parser/Lines.php +127 -0
  304. package/src/api/vendor/vlucas/phpdotenv/src/Parser/Parser.php +53 -0
  305. package/src/api/vendor/vlucas/phpdotenv/src/Parser/ParserInterface.php +19 -0
  306. package/src/api/vendor/vlucas/phpdotenv/src/Parser/Value.php +88 -0
  307. package/src/api/vendor/vlucas/phpdotenv/src/Repository/Adapter/AdapterInterface.php +15 -0
  308. package/src/api/vendor/vlucas/phpdotenv/src/Repository/Adapter/ApacheAdapter.php +89 -0
  309. package/src/api/vendor/vlucas/phpdotenv/src/Repository/Adapter/ArrayAdapter.php +80 -0
  310. package/src/api/vendor/vlucas/phpdotenv/src/Repository/Adapter/EnvConstAdapter.php +88 -0
  311. package/src/api/vendor/vlucas/phpdotenv/src/Repository/Adapter/GuardedWriter.php +85 -0
  312. package/src/api/vendor/vlucas/phpdotenv/src/Repository/Adapter/ImmutableWriter.php +110 -0
  313. package/src/api/vendor/vlucas/phpdotenv/src/Repository/Adapter/MultiReader.php +48 -0
  314. package/src/api/vendor/vlucas/phpdotenv/src/Repository/Adapter/MultiWriter.php +64 -0
  315. package/src/api/vendor/vlucas/phpdotenv/src/Repository/Adapter/PutenvAdapter.php +91 -0
  316. package/src/api/vendor/vlucas/phpdotenv/src/Repository/Adapter/ReaderInterface.php +17 -0
  317. package/src/api/vendor/vlucas/phpdotenv/src/Repository/Adapter/ReplacingWriter.php +104 -0
  318. package/src/api/vendor/vlucas/phpdotenv/src/Repository/Adapter/ServerConstAdapter.php +88 -0
  319. package/src/api/vendor/vlucas/phpdotenv/src/Repository/Adapter/WriterInterface.php +27 -0
  320. package/src/api/vendor/vlucas/phpdotenv/src/Repository/AdapterRepository.php +107 -0
  321. package/src/api/vendor/vlucas/phpdotenv/src/Repository/RepositoryBuilder.php +272 -0
  322. package/src/api/vendor/vlucas/phpdotenv/src/Repository/RepositoryInterface.php +51 -0
  323. package/src/api/vendor/vlucas/phpdotenv/src/Store/File/Paths.php +44 -0
  324. package/src/api/vendor/vlucas/phpdotenv/src/Store/File/Reader.php +81 -0
  325. package/src/api/vendor/vlucas/phpdotenv/src/Store/FileStore.php +72 -0
  326. package/src/api/vendor/vlucas/phpdotenv/src/Store/StoreBuilder.php +141 -0
  327. package/src/api/vendor/vlucas/phpdotenv/src/Store/StoreInterface.php +17 -0
  328. package/src/api/vendor/vlucas/phpdotenv/src/Store/StringStore.php +37 -0
  329. package/src/api/vendor/vlucas/phpdotenv/src/Util/Regex.php +112 -0
  330. package/src/api/vendor/vlucas/phpdotenv/src/Util/Str.php +108 -0
  331. package/src/api/vendor/vlucas/phpdotenv/src/Validator.php +207 -0
  332. package/src/api/vendor/vlucas/phpdotenv/tests/Dotenv/DotenvTest.php +387 -0
  333. package/src/api/vendor/vlucas/phpdotenv/tests/Dotenv/Loader/LoaderTest.php +86 -0
  334. package/src/api/vendor/vlucas/phpdotenv/tests/Dotenv/Parser/EntryParserTest.php +234 -0
  335. package/src/api/vendor/vlucas/phpdotenv/tests/Dotenv/Parser/LexerTest.php +40 -0
  336. package/src/api/vendor/vlucas/phpdotenv/tests/Dotenv/Parser/LinesTest.php +53 -0
  337. package/src/api/vendor/vlucas/phpdotenv/tests/Dotenv/Parser/ParserTest.php +98 -0
  338. package/src/api/vendor/vlucas/phpdotenv/tests/Dotenv/Repository/Adapter/ArrayAdapterTest.php +57 -0
  339. package/src/api/vendor/vlucas/phpdotenv/tests/Dotenv/Repository/Adapter/EnvConstAdapterTest.php +75 -0
  340. package/src/api/vendor/vlucas/phpdotenv/tests/Dotenv/Repository/Adapter/PutenvAdapterTest.php +52 -0
  341. package/src/api/vendor/vlucas/phpdotenv/tests/Dotenv/Repository/Adapter/ServerConstAdapterTest.php +75 -0
  342. package/src/api/vendor/vlucas/phpdotenv/tests/Dotenv/Repository/RepositoryTest.php +305 -0
  343. package/src/api/vendor/vlucas/phpdotenv/tests/Dotenv/Store/StoreTest.php +141 -0
  344. package/src/api/vendor/vlucas/phpdotenv/tests/Dotenv/ValidatorTest.php +479 -0
  345. package/src/api/vendor/vlucas/phpdotenv/tests/fixtures/env/.env +5 -0
  346. package/src/api/vendor/vlucas/phpdotenv/tests/fixtures/env/assertions.env +18 -0
  347. package/src/api/vendor/vlucas/phpdotenv/tests/fixtures/env/booleans.env +33 -0
  348. package/src/api/vendor/vlucas/phpdotenv/tests/fixtures/env/commented.env +15 -0
  349. package/src/api/vendor/vlucas/phpdotenv/tests/fixtures/env/empty.env +1 -0
  350. package/src/api/vendor/vlucas/phpdotenv/tests/fixtures/env/example.env +1 -0
  351. package/src/api/vendor/vlucas/phpdotenv/tests/fixtures/env/exported.env +7 -0
  352. package/src/api/vendor/vlucas/phpdotenv/tests/fixtures/env/immutable.env +1 -0
  353. package/src/api/vendor/vlucas/phpdotenv/tests/fixtures/env/integers.env +17 -0
  354. package/src/api/vendor/vlucas/phpdotenv/tests/fixtures/env/large.env +2 -0
  355. package/src/api/vendor/vlucas/phpdotenv/tests/fixtures/env/multibyte.env +3 -0
  356. package/src/api/vendor/vlucas/phpdotenv/tests/fixtures/env/multiline.env +14 -0
  357. package/src/api/vendor/vlucas/phpdotenv/tests/fixtures/env/multiple.env +4 -0
  358. package/src/api/vendor/vlucas/phpdotenv/tests/fixtures/env/mutable.env +1 -0
  359. package/src/api/vendor/vlucas/phpdotenv/tests/fixtures/env/nested.env +15 -0
  360. package/src/api/vendor/vlucas/phpdotenv/tests/fixtures/env/quoted.env +11 -0
  361. package/src/api/vendor/vlucas/phpdotenv/tests/fixtures/env/specialchars.env +8 -0
  362. package/src/api/vendor/vlucas/phpdotenv/tests/fixtures/env/unicodevarnames.env +2 -0
  363. package/src/api/vendor/vlucas/phpdotenv/tests/fixtures/env/utf8-with-bom-encoding.env +3 -0
  364. package/src/api/vendor/vlucas/phpdotenv/tests/fixtures/env/windows.env +1 -0
  365. package/src/api/vendor/vlucas/phpdotenv/vendor-bin/phpstan/composer.json +15 -0
@@ -0,0 +1,84 @@
1
+ {
2
+ "name": "phpmailer/phpmailer",
3
+ "type": "library",
4
+ "description": "PHPMailer is a full-featured email creation and transfer class for PHP",
5
+ "authors": [
6
+ {
7
+ "name": "Marcus Bointon",
8
+ "email": "phpmailer@synchromedia.co.uk"
9
+ },
10
+ {
11
+ "name": "Jim Jagielski",
12
+ "email": "jimjag@gmail.com"
13
+ },
14
+ {
15
+ "name": "Andy Prevost",
16
+ "email": "codeworxtech@users.sourceforge.net"
17
+ },
18
+ {
19
+ "name": "Brent R. Matzelle"
20
+ }
21
+ ],
22
+ "funding": [
23
+ {
24
+ "url": "https://github.com/Synchro",
25
+ "type": "github"
26
+ }
27
+ ],
28
+ "config": {
29
+ "allow-plugins": {
30
+ "dealerdirect/phpcodesniffer-composer-installer": true
31
+ },
32
+ "lock": false
33
+ },
34
+ "require": {
35
+ "php": ">=5.5.0",
36
+ "ext-ctype": "*",
37
+ "ext-filter": "*",
38
+ "ext-hash": "*"
39
+ },
40
+ "require-dev": {
41
+ "dealerdirect/phpcodesniffer-composer-installer": "^1.0",
42
+ "doctrine/annotations": "^1.2.6 || ^1.13.3",
43
+ "php-parallel-lint/php-console-highlighter": "^1.0.0",
44
+ "php-parallel-lint/php-parallel-lint": "^1.3.2",
45
+ "phpcompatibility/php-compatibility": "^10.0.0@dev",
46
+ "squizlabs/php_codesniffer": "^3.13.5",
47
+ "yoast/phpunit-polyfills": "^1.0.4"
48
+ },
49
+ "suggest": {
50
+ "decomplexity/SendOauth2": "Adapter for using XOAUTH2 authentication",
51
+ "ext-imap": "Needed to support advanced email address parsing according to RFC822",
52
+ "ext-mbstring": "Needed to send email in multibyte encoding charset or decode encoded addresses",
53
+ "ext-openssl": "Needed for secure SMTP sending and DKIM signing",
54
+ "greew/oauth2-azure-provider": "Needed for Microsoft Azure XOAUTH2 authentication",
55
+ "hayageek/oauth2-yahoo": "Needed for Yahoo XOAUTH2 authentication",
56
+ "league/oauth2-google": "Needed for Google XOAUTH2 authentication",
57
+ "psr/log": "For optional PSR-3 debug logging",
58
+ "symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)",
59
+ "thenetworg/oauth2-azure": "Needed for Microsoft XOAUTH2 authentication",
60
+ "directorytree/imapengine": "For uploading sent messages via IMAP, see gmail example"
61
+ },
62
+ "minimum-stability": "dev",
63
+ "prefer-stable": true,
64
+ "autoload": {
65
+ "psr-4": {
66
+ "PHPMailer\\PHPMailer\\": "src/"
67
+ }
68
+ },
69
+ "autoload-dev": {
70
+ "psr-4": {
71
+ "PHPMailer\\Test\\": "test/"
72
+ }
73
+ },
74
+ "license": "LGPL-2.1-only",
75
+ "scripts": {
76
+ "check": "./vendor/bin/phpcs",
77
+ "style": "./vendor/bin/phpcbf",
78
+ "test": "./vendor/bin/phpunit --no-coverage",
79
+ "coverage": "./vendor/bin/phpunit",
80
+ "lint": [
81
+ "@php ./vendor/php-parallel-lint/php-parallel-lint/parallel-lint . --show-deprecated -e php,phps --exclude vendor --exclude .git --exclude build"
82
+ ]
83
+ }
84
+ }
@@ -0,0 +1,9 @@
1
+ # PHPMailer Documentation
2
+
3
+ Generated documentation for PHPMailer is [available online](https://phpmailer.github.io/PHPMailer/), and is regenerated automatically whenever changes are made.
4
+
5
+ Pre-built PHPMailer API documentation is not provided in this repo, but you can generate it by running `phpdoc` in the top-level folder of this project, and documentation will be generated in this `docs` folder. You will need to have [phpDocumentor](https://www.phpdoc.org) installed. The configuration for phpdoc is in the [phpdoc.dist.xml file](https://github.com/PHPMailer/PHPMailer/blob/master/phpdoc.dist.xml).
6
+
7
+ Further help and information is available in [the PHPMailer README](https://github.com/PHPMailer/PHPMailer/blob/master/README.md), [the examples folder](https://github.com/PHPMailer/PHPMailer/tree/master/examples), and in [the GitHub wiki](https://github.com/PHPMailer/PHPMailer/wiki).
8
+
9
+ Fixes and additions to documentation are welcome - please submit pull requests or improve wiki pages.
@@ -0,0 +1,81 @@
1
+ <?php
2
+
3
+ /**
4
+ * This shows how to make a new public/private key pair suitable for use with DKIM.
5
+ * You should only need to do this once, and the public key (**not** the private key!)
6
+ * you generate should be inserted in your DNS matching the selector you want.
7
+ *
8
+ * You can also use the DKIM wizard here: https://www.sparkpost.com/resources/tools/dkim-wizard/
9
+ * but be aware that having your private key known anywhere outside your own server
10
+ * is a security risk, and it's easy enough to create your own on your own server.
11
+ *
12
+ * For security, any keys you create should not be accessible via your web site.
13
+ *
14
+ * 2048 bits is the recommended minimum key length - gmail won't accept less than 1024 bits.
15
+ * To test your DKIM config, use Sparkpost's DKIM tester:
16
+ * https://tools.sparkpost.com/dkim
17
+ *
18
+ * Note that you only need a *private* key to *send* a DKIM-signed message,
19
+ * but receivers need your *public* key in order to verify it.
20
+ *
21
+ * Your public key will need to be formatted appropriately for your DNS and
22
+ * inserted there using the selector you want to use.
23
+ */
24
+
25
+ //Set these to match your domain and chosen DKIM selector
26
+ $domain = 'example.com';
27
+ $selector = 'phpmailer';
28
+
29
+ //Private key filename for this selector
30
+ $privatekeyfile = $selector . '_dkim_private.pem';
31
+ //Public key filename for this selector
32
+ $publickeyfile = $selector . '_dkim_public.pem';
33
+
34
+ if (file_exists($privatekeyfile)) {
35
+ echo "Using existing keys - if you want to generate new keys, delete old key files first.\n\n";
36
+ $privatekey = file_get_contents($privatekeyfile);
37
+ $publickey = file_get_contents($publickeyfile);
38
+ } else {
39
+ //Create a 2048-bit RSA key with an SHA256 digest
40
+ $pk = openssl_pkey_new(
41
+ [
42
+ 'digest_alg' => 'sha256',
43
+ 'private_key_bits' => 2048,
44
+ 'private_key_type' => OPENSSL_KEYTYPE_RSA,
45
+ ]
46
+ );
47
+ //Save private key
48
+ openssl_pkey_export_to_file($pk, $privatekeyfile);
49
+ //Save public key
50
+ $pubKey = openssl_pkey_get_details($pk);
51
+ $publickey = $pubKey['key'];
52
+ file_put_contents($publickeyfile, $publickey);
53
+ $privatekey = file_get_contents($privatekeyfile);
54
+ }
55
+ echo "Private key (keep this private!):\n\n" . $privatekey;
56
+ echo "\n\nPublic key:\n\n" . $publickey;
57
+
58
+ //Prepare public key for DNS, e.g.
59
+ //phpmailer._domainkey.example.com IN TXT "v=DKIM1; h=sha256; t=s; p=" "MIIBIjANBg...oXlwIDAQAB"...
60
+ $dnskey = "$selector._domainkey.$domain IN TXT";
61
+ $dnsvalue = '"v=DKIM1; h=sha256; t=s; p=" ';
62
+ //Some DNS servers don't like ;(semi colon) chars unless backslash-escaped
63
+ $dnsvalue2 = '"v=DKIM1\; h=sha256\; t=s\; p=" ';
64
+
65
+ //Strip and split the key into smaller parts and format for DNS
66
+ //Many DNS systems don't like long TXT entries
67
+ //but are OK if it's split into 255-char chunks
68
+ //Remove PEM wrapper
69
+ $publickey = preg_replace('/^-+.*?-+$/m', '', $publickey);
70
+ //Strip line breaks
71
+ $publickey = str_replace(["\r", "\n"], '', $publickey);
72
+ //Split into chunks
73
+ $keyparts = str_split($publickey, 253); //Becomes 255 when quotes are included
74
+ //Quote each chunk
75
+ foreach ($keyparts as $keypart) {
76
+ $dnsvalue .= '"' . trim($keypart) . '" ';
77
+ $dnsvalue2 .= '"' . trim($keypart) . '" ';
78
+ }
79
+ echo "\n\nDNS key:\n\n" . trim($dnskey);
80
+ echo "\n\nDNS value:\n\n" . trim($dnsvalue);
81
+ echo "\n\nDNS value (with escaping):\n\n" . trim($dnsvalue2);
@@ -0,0 +1,46 @@
1
+ <?php
2
+
3
+ /**
4
+ * This example shows sending a DKIM-signed message with PHPMailer.
5
+ * More info about DKIM can be found here: https://www.dkim.org/info/dkim-faq.html
6
+ * There's more to using DKIM than just this code - check out this article:
7
+ * @see https://yomotherboard.com/how-to-setup-email-server-dkim-keys/
8
+ * See also the DKIM_gen_keys example code in the examples folder,
9
+ * which shows how to make a key pair from PHP.
10
+ */
11
+
12
+ //Import the PHPMailer class into the global namespace
13
+ use PHPMailer\PHPMailer\PHPMailer;
14
+
15
+ require '../vendor/autoload.php';
16
+
17
+ //Usual setup
18
+ $mail = new PHPMailer();
19
+ $mail->setFrom('from@example.com', 'First Last');
20
+ $mail->addAddress('whoto@example.com', 'John Doe');
21
+ $mail->Subject = 'PHPMailer mail() test';
22
+ $mail->msgHTML(file_get_contents('contents.html'), __DIR__);
23
+
24
+ //This should be the same as the domain of your From address
25
+ $mail->DKIM_domain = 'example.com';
26
+ //See the DKIM_gen_keys.phps script for making a key pair -
27
+ //here we assume you've already done that.
28
+ //Path to your private key:
29
+ $mail->DKIM_private = 'dkim_private.pem';
30
+ //Set this to your own selector
31
+ $mail->DKIM_selector = 'phpmailer';
32
+ //Put your private key's passphrase in here if it has one
33
+ $mail->DKIM_passphrase = '';
34
+ //The identity you're signing as - usually your From address
35
+ $mail->DKIM_identity = $mail->From;
36
+ //Suppress listing signed header fields in signature, defaults to true for debugging purpose
37
+ $mail->DKIM_copyHeaderFields = false;
38
+ //Optionally you can add extra headers for signing to meet special requirements
39
+ $mail->DKIM_extraHeaders = ['List-Unsubscribe', 'List-Help'];
40
+
41
+ //When you send, the DKIM settings will be used to sign the message
42
+ if (!$mail->send()) {
43
+ echo 'Mailer Error: ' . $mail->ErrorInfo;
44
+ } else {
45
+ echo 'Message sent!';
46
+ }
@@ -0,0 +1,96 @@
1
+ [![PHPMailer logo](images/phpmailer.png)](https://github.com/PHPMailer/PHPMailer)
2
+ # PHPMailer code examples
3
+
4
+ This folder contains a collection of examples of using [PHPMailer](https://github.com/PHPMailer/PHPMailer).
5
+
6
+ ## About testing email sending
7
+
8
+ When working on email sending code you'll find yourself worrying about what might happen if all these test emails got sent to your mailing list. The solution is to use a fake mail server, one that acts just like the real thing, but just doesn't actually send anything out. Some offer web interfaces, feedback, logging, the ability to return specific error codes, all things that are useful for testing error handling, authentication etc. Here's a selection of mail testing tools you might like to try:
9
+
10
+ * [FakeEmail](https://github.com/tomwardill/FakeEmail), a Python-based fake mail server with a web interface.
11
+ * [smtp-sink](https://www.postfix.org/smtp-sink.1.html), part of the Postfix mail server, so you may have this installed already. This is used in the GitHub actions configuration to run PHPMailer's unit tests.
12
+ * [smtp4dev](https://github.com/rnwood/smtp4dev), a dummy SMTP server for Windows and Linux.
13
+ * [fakesendmail.sh](https://github.com/PHPMailer/PHPMailer/blob/master/test/fakesendmail.sh), part of PHPMailer's test setup, this is a shell script that emulates sendmail for testing 'mail' or 'sendmail' methods in PHPMailer.
14
+ * [HELO](https://usehelo.com), a very nice (commercial) mail server desktop app from BeyondCode, and [how to set it up for local testing](https://usehelo.com/blog/how-to-use-helo-with-phps-mail-function).
15
+ * [msglint](https://www.splitbrain.org/_static/msglint/), not a mail server, the IETF's MIME structure analyser checks the formatting of your messages.
16
+ * [MailHog](https://github.com/les-enovateurs/mailhog-examples), a Go-based email testing tool for developers with a web interface. You can use it with Docker and GitHub Actions to test your mails. The repository also contains a small part of PHPMailer's setup.
17
+ * [aboutmy.email](https://aboutmy.email), a service for evaluating your email config – SPF, DKIM, DMARC, and compliance with list-unsubscribe, TLS, and many other settings.
18
+
19
+ Most of these examples use the `example.com` and `example.net` domains. These domains are reserved by IANA for illustrative purposes, as documented in [RFC 2606](https://www.rfc-editor.org/rfc/rfc2606). Don't use made-up domains like 'mydomain.com' or 'somedomain.com' in examples as someone, somewhere, probably owns them!
20
+
21
+ ## Security note
22
+ Before running these examples in a web server, you'll need to rename them with '.php' extensions. They are supplied as '.phps' files which will usually be displayed with syntax highlighting by PHP instead of running them. This prevents potential security issues with running potential spam-gateway code if you happen to deploy these code examples on a live site - _please don't do that!_
23
+
24
+ Similarly, don't leave your passwords in these files as they will be visible to the world!
25
+
26
+ ## [mail.phps](mail.phps)
27
+
28
+ This is a basic example which creates an email message from an external HTML file, creates a plain text body, sets various addresses, adds an attachment and sends the message. It uses PHP's built-in mail() function which is the simplest to use, but relies on the presence of a local mail server, something which is not usually available on Windows. If you find yourself in that situation, either install a local mail server, or use a remote one and send using SMTP instead.
29
+
30
+ ## [simple_contact_form.phps](simple_contact_form.phps)
31
+
32
+ This is probably the most common reason for using PHPMailer - building a contact form. This example has a basic, unstyled form and also illustrates how to filter input data before using it, how to validate addresses, how to avoid being abused as a spam gateway, and how to address messages correctly so that you don't fail SPF checks.
33
+
34
+ ## [exceptions.phps](exceptions.phps)
35
+
36
+ Like the mail example, but shows how to use PHPMailer's optional exceptions for error handling.
37
+
38
+ ## [extending.phps](extending.phps)
39
+
40
+ This shows how to create a subclass of PHPMailer to customise its behaviour and simplify coding in your app.
41
+
42
+ ## [smtp.phps](smtp.phps)
43
+
44
+ A simple example sending using SMTP with authentication.
45
+
46
+ ## [smtp_no_auth.phps](smtp_no_auth.phps)
47
+
48
+ A simple example sending using SMTP without authentication.
49
+
50
+ ## [send_file_upload.phps](send_file_upload.phps)
51
+
52
+ Lots of people want to do this... This is a simple form which accepts a file upload and emails it.
53
+
54
+ ## [send_multiple_file_upload.phps](send_multiple_file_upload.phps)
55
+
56
+ A slightly more complex form that allows uploading multiple files at once and sends all of them as attachments to an email.
57
+
58
+ ## [sendmail.phps](sendmail.phps)
59
+
60
+ A simple example using sendmail. Sendmail is a program (usually found on Linux/BSD, OS X and other UNIX-alikes) that can be used to submit messages to a local mail server without a lengthy SMTP conversation. It's probably the fastest sending mechanism, but lacks some error reporting features. There are sendmail emulators for most popular mail servers including postfix, qmail, exim etc.
61
+
62
+ ## [gmail.phps](gmail.phps)
63
+
64
+ Submitting email via Google's Gmail service is a popular use of PHPMailer. It's much the same as normal SMTP sending, just with some specific settings, namely using TLS encryption, authentication is enabled, and it connects to the SMTP submission port 587 on the smtp.gmail.com host. This example does all that.
65
+
66
+ ## [gmail_xoauth.phps](gmail_xoauth.phps)
67
+
68
+ Gmail now likes you to use XOAUTH2 for SMTP authentication. This is extremely laborious to set up, but once it's done you can use it repeatedly and will no longer need Gmail's ineptly-named "Allow less secure apps" setting enabled. [Read the guide in the wiki](https://github.com/PHPMailer/PHPMailer/wiki/Using-Gmail-with-XOAUTH2) for how to set it up.
69
+
70
+ ## [pop_before_smtp.phps](pop_before_smtp.phps)
71
+
72
+ Back in the stone age, before effective SMTP authentication mechanisms were available, it was common for ISPs to use POP-before-SMTP authentication. As it implies, you authenticate using the POP3 protocol (an older protocol now mostly replaced by the far superior IMAP), and then the SMTP server will allow send access from your IP address for a short while, usually 5-15 minutes. PHPMailer includes a basic POP3 protocol client with just enough functionality to carry out this sequence - it's just like a normal SMTP conversation (without authentication), but connects via POP3 first.
73
+
74
+ ## [mailing_list.phps](mailing_list.phps)
75
+
76
+ This is a somewhat naïve, but reasonably efficient example of sending similar emails to a list of different addresses. It sets up a PHPMailer instance using SMTP, then connects to a MySQL database to retrieve a list of recipients. The code loops over this list, sending email to each person using their info and marks them as sent in the database. It makes use of SMTP keepalive which saves reconnecting and re-authenticating between each message.
77
+
78
+ ## [ssl_options.phps](ssl_options.phps)
79
+
80
+ PHP 5.6 introduced SSL certificate verification by default, and this applies to mail servers exactly as it does to web servers. Unfortunately, SSL misconfiguration in mail servers is quite common, so this caused a common problem: those that were previously using servers with bad configs suddenly found they stopped working when they upgraded PHP. PHPMailer provides a mechanism to disable SSL certificate verification as a workaround and this example shows how to do it. Bear in mind that this is **not** a good approach - the right way is to fix your mail server config!
81
+
82
+ ## [smime_signed_mail.phps](smime_signed_mail.phps)
83
+
84
+ An example of how to sign messages using [S/MIME](https://en.wikipedia.org/wiki/S/MIME), ensuring that your data can't be tampered with in transit, and proves to recipients that it was you that sent it.
85
+
86
+ * * *
87
+
88
+ ## [smtp_check.phps](smtp_check.phps)
89
+
90
+ This is an example showing how to use the SMTP class by itself (without PHPMailer) to check an SMTP connection.
91
+
92
+ ## [smtp_low_memory.phps](smtp_low_memory.phps)
93
+
94
+ This demonstrates how to extend the SMTP class and make PHPMailer use it. In this case it's an effort to make the SMTP class use less memory when sending large attachments.
95
+
96
+ * * *
@@ -0,0 +1,126 @@
1
+ <?php
2
+
3
+ /**
4
+ * This example shows how to send via Microsoft Outlook's servers using XOAUTH2 authentication
5
+ * using the league/oauth2-client to provide the OAuth2 token.
6
+ * To use a different OAuth2 library create a wrapper class that implements OAuthTokenProvider and
7
+ * pass that wrapper class to PHPMailer::setOAuth().
8
+ */
9
+
10
+ //Import PHPMailer classes into the global namespace
11
+ use PHPMailer\PHPMailer\PHPMailer;
12
+ use PHPMailer\PHPMailer\SMTP;
13
+ use PHPMailer\PHPMailer\OAuth;
14
+ //Alias the League Google OAuth2 provider class
15
+ use Greew\OAuth2\Client\Provider\Azure;
16
+
17
+ //SMTP needs accurate times, and the PHP time zone MUST be set
18
+ //This should be done in your php.ini, but this is how to do it if you don't have access to that
19
+ date_default_timezone_set('Etc/UTC');
20
+
21
+ //Load dependencies from composer
22
+ //If this causes an error, run 'composer install'
23
+ require '../vendor/autoload.php';
24
+
25
+ //Create a new PHPMailer instance
26
+ $mail = new PHPMailer();
27
+
28
+ //Tell PHPMailer to use SMTP
29
+ $mail->isSMTP();
30
+
31
+ //Enable SMTP debugging
32
+ //SMTP::DEBUG_OFF = off (for production use)
33
+ //SMTP::DEBUG_CLIENT = client messages
34
+ //SMTP::DEBUG_SERVER = client and server messages
35
+ $mail->SMTPDebug = SMTP::DEBUG_SERVER;
36
+
37
+ //Set the hostname of the mail server
38
+ $mail->Host = 'smtp.office365.com';
39
+
40
+ //Set the SMTP port number:
41
+ // - 465 for SMTP with implicit TLS, a.k.a. RFC8314 SMTPS or
42
+ // - 587 for SMTP+STARTTLS
43
+ $mail->Port = 587;
44
+
45
+ //Set the encryption mechanism to use:
46
+ // - SMTPS (implicit TLS on port 465) or
47
+ // - STARTTLS (explicit TLS on port 587)
48
+ $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS;
49
+
50
+ //Whether to use SMTP authentication
51
+ $mail->SMTPAuth = true;
52
+
53
+ //Set AuthType to use XOAUTH2
54
+ $mail->AuthType = 'XOAUTH2';
55
+
56
+ //Start Option 1: Use league/oauth2-client as OAuth2 token provider
57
+ //Fill in authentication details here
58
+ //Either the microsoft account owner, or the user that gave consent
59
+ $email = 'someone@somemicrosoftaccount.com';
60
+ $clientId = 'RANDOMCHARS-----duv1n2TS';
61
+ $clientSecret = 'RANDOMCHARS-----lGyjPcRtvP';
62
+ $tenantId = 'RANDOMCHARS-----HSFTAOIlagss';
63
+
64
+ //Obtained by configuring and running get_oauth_token.php
65
+ //after setting up an app in Google Developer Console.
66
+ $refreshToken = 'RANDOMCHARS-----DWxgOvPT003r-yFUV49TQYag7_Aod7y0';
67
+
68
+ //Create a new OAuth2 provider instance
69
+ $provider = new Azure(
70
+ [
71
+ 'clientId' => $clientId,
72
+ 'clientSecret' => $clientSecret,
73
+ 'tenantId' => $tenantId,
74
+ ]
75
+ );
76
+
77
+ //Pass the OAuth provider instance to PHPMailer
78
+ $mail->setOAuth(
79
+ new OAuth(
80
+ [
81
+ 'provider' => $provider,
82
+ 'clientId' => $clientId,
83
+ 'clientSecret' => $clientSecret,
84
+ 'refreshToken' => $refreshToken,
85
+ 'userName' => $email,
86
+ ]
87
+ )
88
+ );
89
+ //End Option 1
90
+
91
+ //Option 2: Another OAuth library as OAuth2 token provider
92
+ //Set up the other oauth library as per its documentation
93
+ //Then create the wrapper class that implementations OAuthTokenProvider
94
+ $oauthTokenProvider = new MyOAuthTokenProvider(/* Email, ClientId, ClientSecret, etc. */);
95
+
96
+ //Pass the implementation of OAuthTokenProvider to PHPMailer
97
+ $mail->setOAuth($oauthTokenProvider);
98
+ //End Option 2
99
+
100
+ //Set who the message is to be sent from
101
+ //For Outlook, this generally needs to be the same as the user you logged in as
102
+ $mail->setFrom($email, 'First Last');
103
+
104
+ //Set who the message is to be sent to
105
+ $mail->addAddress('someone@someserver.com', 'John Doe');
106
+
107
+ //Set the subject line
108
+ $mail->Subject = 'PHPMailer Outlook XOAUTH2 SMTP test';
109
+
110
+ //Read an HTML message body from an external file, convert referenced images to embedded,
111
+ //convert HTML into a basic plain-text alternative body
112
+ $mail->CharSet = PHPMailer::CHARSET_UTF8;
113
+ $mail->msgHTML(file_get_contents('contentsutf8.html'), __DIR__);
114
+
115
+ //Replace the plain text body with one created manually
116
+ $mail->AltBody = 'This is a plain-text message body';
117
+
118
+ //Attach an image file
119
+ $mail->addAttachment('images/phpmailer_mini.png');
120
+
121
+ //send the message, check for errors
122
+ if (!$mail->send()) {
123
+ echo 'Mailer Error: ' . $mail->ErrorInfo;
124
+ } else {
125
+ echo 'Message sent!';
126
+ }
@@ -0,0 +1,76 @@
1
+ <?php
2
+
3
+ /**
4
+ * This example shows how to use a callback function from PHPMailer.
5
+ */
6
+
7
+ //Import PHPMailer classes into the global namespace
8
+ use PHPMailer\PHPMailer\PHPMailer;
9
+ use PHPMailer\PHPMailer\Exception;
10
+
11
+ require '../vendor/autoload.php';
12
+
13
+ /**
14
+ * Example PHPMailer callback function.
15
+ * This is a global function, but you can also pass a closure (or any other callable)
16
+ * to the `action_function` property.
17
+ *
18
+ * @param bool $result result of the send action
19
+ * @param array $to email address of the recipient
20
+ * @param array $cc cc email addresses
21
+ * @param array $bcc bcc email addresses
22
+ * @param string $subject the subject
23
+ * @param string $body the email body
24
+ */
25
+ function callbackAction($result, $to, $cc, $bcc, $subject, $body)
26
+ {
27
+ echo "Message subject: \"$subject\"\n";
28
+ foreach ($to as $address) {
29
+ echo "Message to {$address[1]} <{$address[0]}>\n";
30
+ }
31
+ foreach ($cc as $address) {
32
+ echo "Message CC to {$address[1]} <{$address[0]}>\n";
33
+ }
34
+ foreach ($bcc as $toaddress) {
35
+ echo "Message BCC to {$toaddress[1]} <{$toaddress[0]}>\n";
36
+ }
37
+ if ($result) {
38
+ echo "Message sent successfully\n";
39
+ } else {
40
+ echo "Message send failed\n";
41
+ }
42
+ }
43
+
44
+ require_once '../vendor/autoload.php';
45
+
46
+ $mail = new PHPMailer();
47
+
48
+ try {
49
+ $mail->isMail();
50
+ $mail->setFrom('you@example.com', 'Your Name');
51
+ $mail->addAddress('jane@example.com', 'Jane Doe');
52
+ $mail->addCC('john@example.com', 'John Doe');
53
+ $mail->Subject = 'PHPMailer Test Subject';
54
+ $mail->msgHTML(file_get_contents('../examples/contents.html'));
55
+ //Optional - msgHTML will create an alternate automatically
56
+ $mail->AltBody = 'To view the message, please use an HTML compatible email viewer!';
57
+ $mail->addAttachment('images/phpmailer_mini.png');
58
+ $mail->action_function = 'callbackAction';
59
+ $mail->send();
60
+ } catch (Exception $e) {
61
+ echo $e->errorMessage();
62
+ }
63
+
64
+ //Alternative approach using a closure
65
+ try {
66
+ $mail->action_function = static function ($result, $to, $cc, $bcc, $subject, $body) {
67
+ if ($result) {
68
+ echo "Message sent successfully\n";
69
+ } else {
70
+ echo "Message send failed\n";
71
+ }
72
+ };
73
+ $mail->send();
74
+ } catch (Exception $e) {
75
+ echo $e->errorMessage();
76
+ }
@@ -0,0 +1,146 @@
1
+ <?php
2
+
3
+ /**
4
+ * This example shows how to handle a simple contact form safely.
5
+ */
6
+
7
+ //Import PHPMailer class into the global namespace
8
+ use PHPMailer\PHPMailer\PHPMailer;
9
+
10
+ //Don't run this unless we're handling a form submission
11
+ if (array_key_exists('email', $_POST)) {
12
+ date_default_timezone_set('Etc/UTC');
13
+ require '../vendor/autoload.php';
14
+ $isAjax = !empty($_SERVER['HTTP_X_REQUESTED_WITH']) &&
15
+ strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) === 'xmlhttprequest';
16
+
17
+ //Create a new PHPMailer instance
18
+ $mail = new PHPMailer();
19
+ //Send using SMTP to localhost (faster and safer than using mail()) – requires a local mail server
20
+ //See other examples for how to use a remote server such as gmail
21
+ $mail->isSMTP();
22
+ $mail->Host = 'localhost';
23
+ $mail->Port = 25;
24
+
25
+ //Use a fixed address in your own domain as the from address
26
+ //**DO NOT** use the submitter's address here as it will be forgery
27
+ //and will cause your messages to fail SPF checks
28
+ $mail->setFrom('from@example.com', 'First Last');
29
+ //Choose who the message should be sent to
30
+ //You don't have to use a <select> like in this example, you can simply use a fixed address
31
+ //the important thing is *not* to trust an email address submitted from the form directly,
32
+ //as an attacker can substitute their own and try to use your form to send spam
33
+ $addresses = [
34
+ 'sales' => 'sales@example.com',
35
+ 'support' => 'support@example.com',
36
+ 'accounts' => 'accounts@example.com',
37
+ ];
38
+ //Validate address selection before trying to use it
39
+ if (array_key_exists('dept', $_POST) && array_key_exists($_POST['dept'], $addresses)) {
40
+ $mail->addAddress($addresses[$_POST['dept']]);
41
+ } else {
42
+ //Fall back to a fixed address if dept selection is invalid or missing
43
+ $mail->addAddress('support@example.com');
44
+ }
45
+ //Put the submitter's address in a reply-to header
46
+ //This will fail if the address provided is invalid,
47
+ //in which case we should ignore the whole request
48
+ if ($mail->addReplyTo($_POST['email'], $_POST['name'])) {
49
+ $mail->Subject = 'PHPMailer contact form';
50
+ //Keep it simple - don't use HTML
51
+ $mail->isHTML(false);
52
+ //Build a simple message body
53
+ $mail->Body = <<<EOT
54
+ Email: {$_POST['email']}
55
+ Name: {$_POST['name']}
56
+ Message: {$_POST['message']}
57
+ EOT;
58
+
59
+ //Send the message, check for errors
60
+ if (!$mail->send()) {
61
+ //The reason for failing to send will be in $mail->ErrorInfo
62
+ //but it's unsafe to display errors directly to users - process the error, log it on your server.
63
+ if ($isAjax) {
64
+ http_response_code(500);
65
+ }
66
+
67
+ $response = [
68
+ "status" => false,
69
+ "message" => 'Sorry, something went wrong. Please try again later.'
70
+ ];
71
+ } else {
72
+ $response = [
73
+ "status" => true,
74
+ "message" => 'Message sent! Thanks for contacting us.'
75
+ ];
76
+ }
77
+ } else {
78
+ $response = [
79
+ "status" => false,
80
+ "message" => 'Invalid email address, message ignored.'
81
+ ];
82
+ }
83
+
84
+ if ($isAjax) {
85
+ header('Content-type:application/json;charset=utf-8');
86
+ echo json_encode($response);
87
+ exit();
88
+ }
89
+ }
90
+ ?>
91
+ <!DOCTYPE html>
92
+ <html lang="en">
93
+ <head>
94
+ <meta charset="UTF-8">
95
+ <title>Contact form</title>
96
+ </head>
97
+ <body>
98
+ <h1>Contact us</h1>
99
+ <h2 id="status-message"><?php if (isset($response)) {
100
+ echo $response['message'];
101
+ }?></h2>
102
+ <form method="POST" id="contact-form">
103
+ <label for="name">Name: <input type="text" name="name" id="name"></label><br>
104
+ <label for="email">Email address: <input type="email" name="email" id="email"></label><br>
105
+ <label for="message">Message: <textarea name="message" id="message" rows="8" cols="20"></textarea></label><br>
106
+ <label for="dept">Send query to department:</label>
107
+ <select name="dept" id="dept">
108
+ <option value="sales">Sales</option>
109
+ <option value="support" selected>Technical support</option>
110
+ <option value="accounts">Accounts</option>
111
+ </select><br>
112
+ <input type="submit" value="Send">
113
+ </form>
114
+
115
+ <script type="application/javascript">
116
+ const form = document.getElementById("contact-form")
117
+
118
+ function email(data) {
119
+ const message = document.getElementById("status-message")
120
+ fetch("", {
121
+ method: "POST",
122
+ body: data,
123
+ headers: {
124
+ 'X-Requested-With' : 'XMLHttpRequest'
125
+ }
126
+ })
127
+ .then(response => response.json())
128
+ .then(response => {message.innerHTML = response.message})
129
+ .catch(error => {
130
+ error.json().then(response => {
131
+ message.innerHTML = response.message
132
+ })
133
+ })
134
+ }
135
+
136
+
137
+ const submitEvent = form.addEventListener("submit", (event) => {
138
+ event.preventDefault();
139
+
140
+ const formData = new FormData(form);
141
+
142
+ email(formData);
143
+ })
144
+ </script>
145
+ </body>
146
+ </html>