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.
- checksums.yaml +4 -4
- data/.rubocop.yml +25 -3
- data/Gemfile +0 -9
- data/Gemfile.lock +162 -5
- data/LICENSE +674 -1
- data/{LICENSE.Nonstandard → LICENSE.dependabot-core} +0 -0
- data/Makefile +8 -1
- data/README.md +39 -5
- data/demo_script.rb +50 -0
- data/dependabot-linguist.gemspec +16 -5
- data/devlog.md +186 -0
- data/exe/dependabot-linguist +145 -0
- data/lib/dependabot/linguist/dependabot_file_validator.rb +190 -0
- data/lib/dependabot/linguist/dependabot_patch.rb +8 -0
- data/lib/dependabot/linguist/file_fetchers/base.rb +48 -0
- data/lib/dependabot/linguist/file_fetchers/git_submodules.rb +63 -0
- data/lib/dependabot/linguist/file_fetchers/go_modules.rb +41 -0
- data/lib/dependabot/linguist/language.rb +62 -0
- data/lib/dependabot/linguist/languages_to_ecosystems/contexts.rb +234 -0
- data/lib/dependabot/linguist/languages_to_ecosystems/contexts_applied.rb +36 -0
- data/lib/dependabot/linguist/languages_to_ecosystems/languages.yaml +7950 -0
- data/lib/dependabot/linguist/languages_to_ecosystems/main.rb +55 -0
- data/lib/dependabot/linguist/languages_to_ecosystems/manager_ecosystem_maps.rb +154 -0
- data/lib/dependabot/linguist/languages_to_patch.txt +37 -0
- data/lib/dependabot/linguist/linguist_patch.rb +6 -0
- data/lib/dependabot/linguist/repository.rb +232 -0
- data/lib/dependabot/linguist/version.rb +1 -1
- data/lib/dependabot/linguist.rb +5 -2
- data/smoke-test/README.md +58 -0
- data/smoke-test/bundler/Gemfile +9 -0
- data/smoke-test/bundler/Gemfile.lock +47 -0
- data/smoke-test/bundler/dependabot-all-updates-test-staging.gemspec +10 -0
- data/smoke-test/cargo/Cargo.lock +90 -0
- data/smoke-test/cargo/Cargo.toml +8 -0
- data/smoke-test/composer/composer.json +5 -0
- data/smoke-test/composer/composer.lock +72 -0
- data/smoke-test/composer/vendor/autoload.php +7 -0
- data/smoke-test/composer/vendor/composer/ClassLoader.php +445 -0
- data/smoke-test/composer/vendor/composer/LICENSE +21 -0
- data/smoke-test/composer/vendor/composer/autoload_classmap.php +13 -0
- data/smoke-test/composer/vendor/composer/autoload_namespaces.php +9 -0
- data/smoke-test/composer/vendor/composer/autoload_psr4.php +9 -0
- data/smoke-test/composer/vendor/composer/autoload_real.php +55 -0
- data/smoke-test/composer/vendor/composer/autoload_static.php +23 -0
- data/smoke-test/composer/vendor/composer/installed.json +57 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/.gitignore +3 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/LICENSE +504 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/README.md +112 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/changelog.md +530 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/class.phpmailer.php +2758 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/class.pop3.php +417 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/class.smtp.php +1075 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/composer.json +32 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/docs/Callback_function_notes.txt +17 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/docs/DomainKeys_notes.txt +55 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/docs/Note_for_SMTP_debugging.txt +23 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/docs/extending.html +148 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/docs/faq.html +67 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/docs/generatedocs.sh +4 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/docs/pop3_article.txt +39 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/docs/use_gmail.txt +44 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/contents.html +20 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/images/phpmailer.gif +0 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/images/phpmailer_mini.gif +0 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/index.html +50 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/test_db_smtp_basic.php +58 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/test_mail_advanced.php +30 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/test_mail_basic.php +41 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/test_pop_before_smtp_advanced.php +39 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/test_pop_before_smtp_basic.php +49 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/test_sendmail_advanced.php +33 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/test_sendmail_basic.php +43 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/test_smtp_advanced.php +42 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/test_smtp_advanced_no_auth.php +36 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/test_smtp_basic.php +58 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/test_smtp_basic_no_auth.php +53 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/test_smtp_gmail_advanced.php +42 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/test_smtp_gmail_basic.php +59 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/extras/class.html2text.inc +489 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/extras/htmlfilter.php +861 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/extras/ntlm_sasl_client.php +185 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ar.php +26 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-br.php +25 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ca.php +25 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ch.php +25 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-cz.php +24 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-de.php +24 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-dk.php +25 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-es.php +25 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-et.php +25 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-fi.php +26 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-fo.php +26 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-fr.php +24 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-hu.php +24 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-it.php +26 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ja.php +25 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-nl.php +24 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-no.php +24 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-pl.php +24 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ro.php +26 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ru.php +24 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-se.php +25 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-sk.php +25 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-tr.php +26 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-zh.php +25 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-zh_cn.php +25 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test/contents.html +10 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test/phpmailerTest.php +1084 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test/test.png +0 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test/test_callback.php +84 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test/testemail.php +48 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/LGPLv3.txt +165 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/contents.html +14 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/images/aikido.gif +0 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/images/bkgrnd.gif +0 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/images/phpmailer.gif +0 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/index.php +427 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/clipboard.swf +0 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushBash.js +59 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushCSharp.js +64 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushCpp.js +99 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushCss.js +93 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushDelphi.js +57 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushDiff.js +43 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushGroovy.js +69 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushJScript.js +51 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushJava.js +55 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushPerl.js +74 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushPhp.js +91 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushPlain.js +35 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushPython.js +56 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushRuby.js +57 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushScala.js +53 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushSql.js +68 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushVb.js +58 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushXml.js +71 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shCore.js +30 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shLegacy.js +30 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/src/shCore.js +1949 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/src/shLegacy.js +172 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/styles/help.png +0 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/styles/magnifier.png +0 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/styles/page_white_code.png +0 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/styles/page_white_copy.png +0 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/styles/printer.png +0 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/styles/shCore.css +321 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/styles/shThemeDefault.css +191 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/styles/shThemeDjango.css +193 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/styles/shThemeEmacs.css +192 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/styles/shThemeFadeToGrey.css +193 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/styles/shThemeMidnight.css +192 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/styles/shThemeRDark.css +192 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/styles/wrapping.png +0 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/test.html +46 -0
- data/smoke-test/dependabot-file/no-config/.github/TARGET.yaml +14 -0
- data/smoke-test/dependabot-file/no-config/bundler/Gemfile +9 -0
- data/smoke-test/dependabot-file/no-config/bundler/Gemfile.lock +47 -0
- data/smoke-test/dependabot-file/no-config/bundler/dependabot-all-updates-test-staging.gemspec +10 -0
- data/smoke-test/dependabot-file/no-config/cargo/Cargo.lock +90 -0
- data/smoke-test/dependabot-file/no-config/cargo/Cargo.toml +8 -0
- data/smoke-test/dependabot-file/no-config/composer/composer.json +5 -0
- data/smoke-test/dependabot-file/no-config/composer/composer.lock +72 -0
- data/smoke-test/dependabot-file/over-config/.github/TARGET.yaml +17 -0
- data/smoke-test/dependabot-file/over-config/.github/dependabot.yaml +12 -0
- data/smoke-test/dependabot-file/over-config/bundler/Gemfile +9 -0
- data/smoke-test/dependabot-file/over-config/bundler/Gemfile.lock +47 -0
- data/smoke-test/dependabot-file/over-config/bundler/dependabot-all-updates-test-staging.gemspec +10 -0
- data/smoke-test/dependabot-file/over-config/cargo/Cargo.lock +90 -0
- data/smoke-test/dependabot-file/over-config/cargo/Cargo.toml +8 -0
- data/smoke-test/dependabot-file/over-config/composer/composer.json +5 -0
- data/smoke-test/dependabot-file/over-config/composer/composer.lock +72 -0
- data/smoke-test/dependabot-file/overer-config/.github/TARGET.yaml +19 -0
- data/smoke-test/dependabot-file/overer-config/.github/dependabot.yaml +12 -0
- data/smoke-test/dependabot-file/overer-config/bundler/Gemfile +9 -0
- data/smoke-test/dependabot-file/overer-config/bundler/Gemfile.lock +47 -0
- data/smoke-test/dependabot-file/overer-config/bundler/dependabot-all-updates-test-staging.gemspec +10 -0
- data/smoke-test/dependabot-file/overer-config/cargo/Cargo.lock +90 -0
- data/smoke-test/dependabot-file/overer-config/cargo/Cargo.toml +8 -0
- data/smoke-test/dependabot-file/overer-config/composer/composer.json +5 -0
- data/smoke-test/dependabot-file/overer-config/composer/composer.lock +72 -0
- data/smoke-test/dependabot-file/partial-config/.github/TARGET.yaml +17 -0
- data/smoke-test/dependabot-file/partial-config/.github/dependabot.yaml +7 -0
- data/smoke-test/dependabot-file/partial-config/bundler/Gemfile +9 -0
- data/smoke-test/dependabot-file/partial-config/bundler/Gemfile.lock +47 -0
- data/smoke-test/dependabot-file/partial-config/bundler/dependabot-all-updates-test-staging.gemspec +10 -0
- data/smoke-test/dependabot-file/partial-config/cargo/Cargo.lock +90 -0
- data/smoke-test/dependabot-file/partial-config/cargo/Cargo.toml +8 -0
- data/smoke-test/dependabot-file/partial-config/composer/composer.json +5 -0
- data/smoke-test/dependabot-file/partial-config/composer/composer.lock +72 -0
- data/smoke-test/docker/Dockerfile +19 -0
- data/smoke-test/elm/elm-package.json +15 -0
- data/smoke-test/elm/elm.json +31 -0
- data/smoke-test/github-actions/both/.github/workflows/this.yaml +11 -0
- data/smoke-test/github-actions/both/yaml/action.yml +13 -0
- data/smoke-test/github-actions/invalid/invalid_file.yaml +0 -0
- data/smoke-test/github-actions/workflow/.github/workflows/this.yaml +11 -0
- data/smoke-test/github-actions/yaml/action.yml +13 -0
- data/smoke-test/gitsubmodule/.gitmodules +4 -0
- data/smoke-test/gomod/go.mod +16 -0
- data/smoke-test/gomod/go.sum +18 -0
- data/smoke-test/gomod/gomain.go +14 -0
- data/smoke-test/gradle/.gitignore +1 -0
- data/smoke-test/gradle/build.gradle +65 -0
- data/smoke-test/maven/pom.xml +65 -0
- data/smoke-test/mix/mix.exs +24 -0
- data/smoke-test/mix/mix.lock +5 -0
- data/smoke-test/npm/package-lock.json +166 -0
- data/smoke-test/npm/package.json +22 -0
- data/smoke-test/npm/removed/package-lock.json +44 -0
- data/smoke-test/npm/removed/package.json +15 -0
- data/smoke-test/nuget/project.csproj +14 -0
- data/smoke-test/pip/pip/requirements.txt +5 -0
- data/smoke-test/pip/pip-compile/requirements.in +2 -0
- data/smoke-test/pip/pip-compile/requirements.txt +16 -0
- data/smoke-test/pip/pipenv/Pipfile +13 -0
- data/smoke-test/pip/pipenv/Pipfile.lock +86 -0
- data/smoke-test/pip/poetry/poetry.lock +33 -0
- data/smoke-test/pip/poetry/pyproject.toml +18 -0
- data/smoke-test/pub/pubspec.lock +40 -0
- data/smoke-test/pub/pubspec.yaml +10 -0
- data/smoke-test/terraform/main.tf +143 -0
- metadata +314 -6
- data/LICENSE.GPL-3.0-only +0 -674
Binary file
|
@@ -0,0 +1,84 @@
|
|
1
|
+
<html>
|
2
|
+
<head>
|
3
|
+
<title>PHPMailer Lite - DKIM and Callback Function test</title>
|
4
|
+
</head>
|
5
|
+
<body>
|
6
|
+
|
7
|
+
<?php
|
8
|
+
/* This is a sample callback function for PHPMailer Lite.
|
9
|
+
* This callback function will echo the results of PHPMailer processing.
|
10
|
+
*/
|
11
|
+
|
12
|
+
/* Callback (action) function
|
13
|
+
* bool $result result of the send action
|
14
|
+
* string $to email address of the recipient
|
15
|
+
* string $cc cc email addresses
|
16
|
+
* string $bcc bcc email addresses
|
17
|
+
* string $subject the subject
|
18
|
+
* string $body the email body
|
19
|
+
* @return boolean
|
20
|
+
*/
|
21
|
+
function callbackAction ($result, $to, $cc, $bcc, $subject, $body) {
|
22
|
+
/*
|
23
|
+
this callback example echos the results to the screen - implement to
|
24
|
+
post to databases, build CSV log files, etc., with minor changes
|
25
|
+
*/
|
26
|
+
$to = cleanEmails($to,'to');
|
27
|
+
$cc = cleanEmails($cc[0],'cc');
|
28
|
+
$bcc = cleanEmails($bcc[0],'cc');
|
29
|
+
echo $result . "\tTo: " . $to['Name'] . "\tTo: " . $to['Email'] . "\tCc: " . $cc['Name'] . "\tCc: " . $cc['Email'] . "\tBcc: " . $bcc['Name'] . "\tBcc: " . $bcc['Email'] . "\t" . $subject . "<br />\n";
|
30
|
+
return true;
|
31
|
+
}
|
32
|
+
|
33
|
+
$testLite = false;
|
34
|
+
|
35
|
+
if ($testLite) {
|
36
|
+
require_once '../class.phpmailer-lite.php';
|
37
|
+
$mail = new PHPMailerLite();
|
38
|
+
} else {
|
39
|
+
require_once '../class.phpmailer.php';
|
40
|
+
$mail = new PHPMailer();
|
41
|
+
}
|
42
|
+
|
43
|
+
try {
|
44
|
+
$mail->IsMail(); // telling the class to use SMTP
|
45
|
+
$mail->SetFrom('you@yourdomain.com', 'Your Name');
|
46
|
+
$mail->AddAddress('another@yourdomain.com', 'John Doe');
|
47
|
+
$mail->Subject = 'PHPMailer Lite Test Subject via Mail()';
|
48
|
+
$mail->AltBody = 'To view the message, please use an HTML compatible email viewer!'; // optional - MsgHTML will create an alternate automatically
|
49
|
+
$mail->MsgHTML(file_get_contents('contents.html'));
|
50
|
+
$mail->AddAttachment('images/phpmailer.gif'); // attachment
|
51
|
+
$mail->AddAttachment('images/phpmailer_mini.gif'); // attachment
|
52
|
+
$mail->action_function = 'callbackAction';
|
53
|
+
$mail->Send();
|
54
|
+
echo "Message Sent OK</p>\n";
|
55
|
+
} catch (phpmailerException $e) {
|
56
|
+
echo $e->errorMessage(); //Pretty error messages from PHPMailer
|
57
|
+
} catch (Exception $e) {
|
58
|
+
echo $e->getMessage(); //Boring error messages from anything else!
|
59
|
+
}
|
60
|
+
|
61
|
+
function cleanEmails($str,$type) {
|
62
|
+
if ($type == 'cc') {
|
63
|
+
$addy['Email'] = $str[0];
|
64
|
+
$addy['Name'] = $str[1];
|
65
|
+
return $addy;
|
66
|
+
}
|
67
|
+
if (!strstr($str, ' <')) {
|
68
|
+
$addy['Name'] = '';
|
69
|
+
$addy['Email'] = $addy;
|
70
|
+
return $addy;
|
71
|
+
}
|
72
|
+
$addyArr = explode(' <', $str);
|
73
|
+
if (substr($addyArr[1],-1) == '>') {
|
74
|
+
$addyArr[1] = substr($addyArr[1],0,-1);
|
75
|
+
}
|
76
|
+
$addy['Name'] = $addyArr[0];
|
77
|
+
$addy['Email'] = $addyArr[1];
|
78
|
+
$addy['Email'] = str_replace('@', '@', $addy['Email']);
|
79
|
+
return $addy;
|
80
|
+
}
|
81
|
+
|
82
|
+
?>
|
83
|
+
</body>
|
84
|
+
</html>
|
@@ -0,0 +1,48 @@
|
|
1
|
+
<?php
|
2
|
+
/**
|
3
|
+
* Simple example script using PHPMailer with exceptions enabled
|
4
|
+
* @package phpmailer
|
5
|
+
* @version $Id$
|
6
|
+
*/
|
7
|
+
|
8
|
+
require '../class.phpmailer.php';
|
9
|
+
|
10
|
+
try {
|
11
|
+
$mail = new PHPMailer(true); //New instance, with exceptions enabled
|
12
|
+
|
13
|
+
$body = file_get_contents('contents.html');
|
14
|
+
$body = preg_replace('/\\\\/','', $body); //Strip backslashes
|
15
|
+
|
16
|
+
$mail->IsSMTP(); // tell the class to use SMTP
|
17
|
+
$mail->SMTPAuth = true; // enable SMTP authentication
|
18
|
+
$mail->Port = 25; // set the SMTP server port
|
19
|
+
$mail->Host = "mail.yourdomain.com"; // SMTP server
|
20
|
+
$mail->Username = "name@domain.com"; // SMTP server username
|
21
|
+
$mail->Password = "password"; // SMTP server password
|
22
|
+
|
23
|
+
$mail->IsSendmail(); // tell the class to use Sendmail
|
24
|
+
|
25
|
+
$mail->AddReplyTo("name@domain.com","First Last");
|
26
|
+
|
27
|
+
$mail->From = "name@domain.com";
|
28
|
+
$mail->FromName = "First Last";
|
29
|
+
|
30
|
+
$to = "someone@example...com";
|
31
|
+
|
32
|
+
$mail->AddAddress($to);
|
33
|
+
|
34
|
+
$mail->Subject = "First PHPMailer Message";
|
35
|
+
|
36
|
+
$mail->AltBody = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test
|
37
|
+
$mail->WordWrap = 80; // set word wrap
|
38
|
+
|
39
|
+
$mail->MsgHTML($body);
|
40
|
+
|
41
|
+
$mail->IsHTML(true); // send as HTML
|
42
|
+
|
43
|
+
$mail->Send();
|
44
|
+
echo 'Message has been sent.';
|
45
|
+
} catch (phpmailerException $e) {
|
46
|
+
echo $e->errorMessage();
|
47
|
+
}
|
48
|
+
?>
|
@@ -0,0 +1,165 @@
|
|
1
|
+
GNU LESSER GENERAL PUBLIC LICENSE
|
2
|
+
Version 3, 29 June 2007
|
3
|
+
|
4
|
+
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
5
|
+
Everyone is permitted to copy and distribute verbatim copies
|
6
|
+
of this license document, but changing it is not allowed.
|
7
|
+
|
8
|
+
|
9
|
+
This version of the GNU Lesser General Public License incorporates
|
10
|
+
the terms and conditions of version 3 of the GNU General Public
|
11
|
+
License, supplemented by the additional permissions listed below.
|
12
|
+
|
13
|
+
0. Additional Definitions.
|
14
|
+
|
15
|
+
As used herein, "this License" refers to version 3 of the GNU Lesser
|
16
|
+
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
17
|
+
General Public License.
|
18
|
+
|
19
|
+
"The Library" refers to a covered work governed by this License,
|
20
|
+
other than an Application or a Combined Work as defined below.
|
21
|
+
|
22
|
+
An "Application" is any work that makes use of an interface provided
|
23
|
+
by the Library, but which is not otherwise based on the Library.
|
24
|
+
Defining a subclass of a class defined by the Library is deemed a mode
|
25
|
+
of using an interface provided by the Library.
|
26
|
+
|
27
|
+
A "Combined Work" is a work produced by combining or linking an
|
28
|
+
Application with the Library. The particular version of the Library
|
29
|
+
with which the Combined Work was made is also called the "Linked
|
30
|
+
Version".
|
31
|
+
|
32
|
+
The "Minimal Corresponding Source" for a Combined Work means the
|
33
|
+
Corresponding Source for the Combined Work, excluding any source code
|
34
|
+
for portions of the Combined Work that, considered in isolation, are
|
35
|
+
based on the Application, and not on the Linked Version.
|
36
|
+
|
37
|
+
The "Corresponding Application Code" for a Combined Work means the
|
38
|
+
object code and/or source code for the Application, including any data
|
39
|
+
and utility programs needed for reproducing the Combined Work from the
|
40
|
+
Application, but excluding the System Libraries of the Combined Work.
|
41
|
+
|
42
|
+
1. Exception to Section 3 of the GNU GPL.
|
43
|
+
|
44
|
+
You may convey a covered work under sections 3 and 4 of this License
|
45
|
+
without being bound by section 3 of the GNU GPL.
|
46
|
+
|
47
|
+
2. Conveying Modified Versions.
|
48
|
+
|
49
|
+
If you modify a copy of the Library, and, in your modifications, a
|
50
|
+
facility refers to a function or data to be supplied by an Application
|
51
|
+
that uses the facility (other than as an argument passed when the
|
52
|
+
facility is invoked), then you may convey a copy of the modified
|
53
|
+
version:
|
54
|
+
|
55
|
+
a) under this License, provided that you make a good faith effort to
|
56
|
+
ensure that, in the event an Application does not supply the
|
57
|
+
function or data, the facility still operates, and performs
|
58
|
+
whatever part of its purpose remains meaningful, or
|
59
|
+
|
60
|
+
b) under the GNU GPL, with none of the additional permissions of
|
61
|
+
this License applicable to that copy.
|
62
|
+
|
63
|
+
3. Object Code Incorporating Material from Library Header Files.
|
64
|
+
|
65
|
+
The object code form of an Application may incorporate material from
|
66
|
+
a header file that is part of the Library. You may convey such object
|
67
|
+
code under terms of your choice, provided that, if the incorporated
|
68
|
+
material is not limited to numerical parameters, data structure
|
69
|
+
layouts and accessors, or small macros, inline functions and templates
|
70
|
+
(ten or fewer lines in length), you do both of the following:
|
71
|
+
|
72
|
+
a) Give prominent notice with each copy of the object code that the
|
73
|
+
Library is used in it and that the Library and its use are
|
74
|
+
covered by this License.
|
75
|
+
|
76
|
+
b) Accompany the object code with a copy of the GNU GPL and this license
|
77
|
+
document.
|
78
|
+
|
79
|
+
4. Combined Works.
|
80
|
+
|
81
|
+
You may convey a Combined Work under terms of your choice that,
|
82
|
+
taken together, effectively do not restrict modification of the
|
83
|
+
portions of the Library contained in the Combined Work and reverse
|
84
|
+
engineering for debugging such modifications, if you also do each of
|
85
|
+
the following:
|
86
|
+
|
87
|
+
a) Give prominent notice with each copy of the Combined Work that
|
88
|
+
the Library is used in it and that the Library and its use are
|
89
|
+
covered by this License.
|
90
|
+
|
91
|
+
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
92
|
+
document.
|
93
|
+
|
94
|
+
c) For a Combined Work that displays copyright notices during
|
95
|
+
execution, include the copyright notice for the Library among
|
96
|
+
these notices, as well as a reference directing the user to the
|
97
|
+
copies of the GNU GPL and this license document.
|
98
|
+
|
99
|
+
d) Do one of the following:
|
100
|
+
|
101
|
+
0) Convey the Minimal Corresponding Source under the terms of this
|
102
|
+
License, and the Corresponding Application Code in a form
|
103
|
+
suitable for, and under terms that permit, the user to
|
104
|
+
recombine or relink the Application with a modified version of
|
105
|
+
the Linked Version to produce a modified Combined Work, in the
|
106
|
+
manner specified by section 6 of the GNU GPL for conveying
|
107
|
+
Corresponding Source.
|
108
|
+
|
109
|
+
1) Use a suitable shared library mechanism for linking with the
|
110
|
+
Library. A suitable mechanism is one that (a) uses at run time
|
111
|
+
a copy of the Library already present on the user's computer
|
112
|
+
system, and (b) will operate properly with a modified version
|
113
|
+
of the Library that is interface-compatible with the Linked
|
114
|
+
Version.
|
115
|
+
|
116
|
+
e) Provide Installation Information, but only if you would otherwise
|
117
|
+
be required to provide such information under section 6 of the
|
118
|
+
GNU GPL, and only to the extent that such information is
|
119
|
+
necessary to install and execute a modified version of the
|
120
|
+
Combined Work produced by recombining or relinking the
|
121
|
+
Application with a modified version of the Linked Version. (If
|
122
|
+
you use option 4d0, the Installation Information must accompany
|
123
|
+
the Minimal Corresponding Source and Corresponding Application
|
124
|
+
Code. If you use option 4d1, you must provide the Installation
|
125
|
+
Information in the manner specified by section 6 of the GNU GPL
|
126
|
+
for conveying Corresponding Source.)
|
127
|
+
|
128
|
+
5. Combined Libraries.
|
129
|
+
|
130
|
+
You may place library facilities that are a work based on the
|
131
|
+
Library side by side in a single library together with other library
|
132
|
+
facilities that are not Applications and are not covered by this
|
133
|
+
License, and convey such a combined library under terms of your
|
134
|
+
choice, if you do both of the following:
|
135
|
+
|
136
|
+
a) Accompany the combined library with a copy of the same work based
|
137
|
+
on the Library, uncombined with any other library facilities,
|
138
|
+
conveyed under the terms of this License.
|
139
|
+
|
140
|
+
b) Give prominent notice with the combined library that part of it
|
141
|
+
is a work based on the Library, and explaining where to find the
|
142
|
+
accompanying uncombined form of the same work.
|
143
|
+
|
144
|
+
6. Revised Versions of the GNU Lesser General Public License.
|
145
|
+
|
146
|
+
The Free Software Foundation may publish revised and/or new versions
|
147
|
+
of the GNU Lesser General Public License from time to time. Such new
|
148
|
+
versions will be similar in spirit to the present version, but may
|
149
|
+
differ in detail to address new problems or concerns.
|
150
|
+
|
151
|
+
Each version is given a distinguishing version number. If the
|
152
|
+
Library as you received it specifies that a certain numbered version
|
153
|
+
of the GNU Lesser General Public License "or any later version"
|
154
|
+
applies to it, you have the option of following the terms and
|
155
|
+
conditions either of that published version or of any later version
|
156
|
+
published by the Free Software Foundation. If the Library as you
|
157
|
+
received it does not specify a version number of the GNU Lesser
|
158
|
+
General Public License, you may choose any version of the GNU Lesser
|
159
|
+
General Public License ever published by the Free Software Foundation.
|
160
|
+
|
161
|
+
If the Library as you received it specifies that a proxy can decide
|
162
|
+
whether future versions of the GNU Lesser General Public License shall
|
163
|
+
apply, that proxy's public statement of acceptance of any version is
|
164
|
+
permanent authorization for you to choose that version for the
|
165
|
+
Library.
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<body>
|
2
|
+
<div style="width: 640px; font-family: Arial, Helvetica, sans-serif; font-size: 11px;">
|
3
|
+
<div align="center"><img src="images/phpmailer.gif" style="height: 90px; width: 340px"></div><br />
|
4
|
+
<br />
|
5
|
+
This is a test of PHPMailer v5.0.0 for PHP5/6.<br />
|
6
|
+
<br />
|
7
|
+
This particular example uses <strong>HTML</strong>, with a <div> tag and inline<br />
|
8
|
+
styles.<br />
|
9
|
+
<br />
|
10
|
+
Also note the use of the PHPMailer at the top with no specific code to handle
|
11
|
+
including it in the body of the email.</div>
|
12
|
+
|
13
|
+
|
14
|
+
</body>
|