forked from team/site
fixmailer
This commit is contained in:
parent
ead346e831
commit
2f9d5cccaa
|
@ -19,6 +19,8 @@
|
||||||
<link rel="stylesheet" href="/css/hacker.css">
|
<link rel="stylesheet" href="/css/hacker.css">
|
||||||
<link rel="stylesheet" href="/css/font-awesome.css">
|
<link rel="stylesheet" href="/css/font-awesome.css">
|
||||||
|
|
||||||
|
<?=$additional_head ?? ""?>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body style="padding-top: 70px;">
|
<body style="padding-top: 70px;">
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
mg.key
|
||||||
|
/vendor/
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"require": {
|
||||||
|
"swiftmailer/swiftmailer": "^6.0"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,184 @@
|
||||||
|
{
|
||||||
|
"_readme": [
|
||||||
|
"This file locks the dependencies of your project to a known state",
|
||||||
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||||
|
"This file is @generated automatically"
|
||||||
|
],
|
||||||
|
"content-hash": "83b6abf6d841cdb5b1ce056b8fcfe973",
|
||||||
|
"packages": [
|
||||||
|
{
|
||||||
|
"name": "doctrine/lexer",
|
||||||
|
"version": "v1.0.1",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/doctrine/lexer.git",
|
||||||
|
"reference": "83893c552fd2045dd78aef794c31e694c37c0b8c"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/doctrine/lexer/zipball/83893c552fd2045dd78aef794c31e694c37c0b8c",
|
||||||
|
"reference": "83893c552fd2045dd78aef794c31e694c37c0b8c",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=5.3.2"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "1.0.x-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-0": {
|
||||||
|
"Doctrine\\Common\\Lexer\\": "lib/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Roman Borschel",
|
||||||
|
"email": "roman@code-factory.org"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Guilherme Blanco",
|
||||||
|
"email": "guilhermeblanco@gmail.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Johannes Schmitt",
|
||||||
|
"email": "schmittjoh@gmail.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.",
|
||||||
|
"homepage": "http://www.doctrine-project.org",
|
||||||
|
"keywords": [
|
||||||
|
"lexer",
|
||||||
|
"parser"
|
||||||
|
],
|
||||||
|
"time": "2014-09-09T13:34:57+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "egulias/email-validator",
|
||||||
|
"version": "2.1.4",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/egulias/EmailValidator.git",
|
||||||
|
"reference": "8790f594151ca6a2010c6218e09d96df67173ad3"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/egulias/EmailValidator/zipball/8790f594151ca6a2010c6218e09d96df67173ad3",
|
||||||
|
"reference": "8790f594151ca6a2010c6218e09d96df67173ad3",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"doctrine/lexer": "^1.0.1",
|
||||||
|
"php": ">= 5.5"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"dominicsayers/isemail": "dev-master",
|
||||||
|
"phpunit/phpunit": "^4.8.35||^5.7||^6.0",
|
||||||
|
"satooshi/php-coveralls": "^1.0.1"
|
||||||
|
},
|
||||||
|
"suggest": {
|
||||||
|
"ext-intl": "PHP Internationalization Libraries are required to use the SpoofChecking validation"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "2.0.x-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Egulias\\EmailValidator\\": "EmailValidator"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Eduardo Gulias Davis"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "A library for validating emails against several RFCs",
|
||||||
|
"homepage": "https://github.com/egulias/EmailValidator",
|
||||||
|
"keywords": [
|
||||||
|
"email",
|
||||||
|
"emailvalidation",
|
||||||
|
"emailvalidator",
|
||||||
|
"validation",
|
||||||
|
"validator"
|
||||||
|
],
|
||||||
|
"time": "2018-04-10T10:11:19+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "swiftmailer/swiftmailer",
|
||||||
|
"version": "v6.0.2",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/swiftmailer/swiftmailer.git",
|
||||||
|
"reference": "412333372fb6c8ffb65496a2bbd7321af75733fc"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/412333372fb6c8ffb65496a2bbd7321af75733fc",
|
||||||
|
"reference": "412333372fb6c8ffb65496a2bbd7321af75733fc",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"egulias/email-validator": "~2.0",
|
||||||
|
"php": ">=7.0.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"mockery/mockery": "~0.9.1",
|
||||||
|
"symfony/phpunit-bridge": "~3.3@dev"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "6.0-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"files": [
|
||||||
|
"lib/swift_required.php"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Chris Corbyn"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Fabien Potencier",
|
||||||
|
"email": "fabien@symfony.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Swiftmailer, free feature-rich PHP mailer",
|
||||||
|
"homepage": "http://swiftmailer.symfony.com",
|
||||||
|
"keywords": [
|
||||||
|
"email",
|
||||||
|
"mail",
|
||||||
|
"mailer"
|
||||||
|
],
|
||||||
|
"time": "2017-09-30T22:39:41+00:00"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"packages-dev": [],
|
||||||
|
"aliases": [],
|
||||||
|
"minimum-stability": "stable",
|
||||||
|
"stability-flags": [],
|
||||||
|
"prefer-stable": false,
|
||||||
|
"prefer-lowest": false,
|
||||||
|
"platform": [],
|
||||||
|
"platform-dev": []
|
||||||
|
}
|
|
@ -1,26 +1,18 @@
|
||||||
<!DOCTYPE html>
|
<?php
|
||||||
<html lang="en">
|
require 'vendor/autoload.php';
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
||||||
<meta name="description" content="tilde.team unix group">
|
|
||||||
<meta name="author" content="Ben Harris">
|
|
||||||
<title>signup~tilde.team</title>
|
|
||||||
|
|
||||||
<link rel="manifest" href="/manifest.json">
|
$pw = file_get_contents("mg.key");
|
||||||
<meta name="theme-color" content="#00cc00">
|
|
||||||
<meta name="msapplication-TileColor" content="#ffffff">
|
|
||||||
<meta name="msapplication-TileImage" content="/ms-icon-310x310.png">
|
|
||||||
<link rel="icon" type="image/png" sizes="192x192" href="/apple-touch-icon-precomposed.png">
|
|
||||||
<link rel="icon" type="image/png" sizes="96x96" href="/favicon-96x96.png">
|
|
||||||
|
|
||||||
<script src="/js/vue.min.js"></script>
|
$transport = (new Swift_SmtpTransport('smtp.mailgun.org', 465, 'ssl'))
|
||||||
<link rel="stylesheet" href="https://tilde.team/css/hacker.css">
|
->setUsername('postmaster@mg.tilde.team')
|
||||||
|
->setPassword($pw);
|
||||||
|
$mailer = new Swift_Mailer($transport);
|
||||||
|
|
||||||
|
$additional_head = '<script src="/js/vue.min.js"></script>';
|
||||||
|
include __DIR__.'/../header.php';
|
||||||
|
?>
|
||||||
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<div class="container" id="app">
|
<div class="container" id="app">
|
||||||
<h1>
|
<h1>
|
||||||
tilde.team signup
|
tilde.team signup
|
||||||
|
@ -66,29 +58,28 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($message == "") {
|
if ($message == "") {
|
||||||
$headers = "From: {$_REQUEST["username"]} <{$_REQUEST["email"]}>\n";
|
$forwardmail = $_REQUEST["forward_email"] == "on"
|
||||||
$headers .= "Sender: www-data@tilde.team\n";
|
? '<a href="https://domains.google.com/registrar#z=e&d=3471834,tilde.team&chp=z,d">yes</a>' : "no";
|
||||||
$headers .= "To: admin@tilde.team\n";
|
|
||||||
$headers .= "Reply-To: {$_REQUEST["email"]}\n";
|
|
||||||
$headers .= "MIME-Version: 1.0\r\n";
|
|
||||||
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
|
|
||||||
$forwardmail = $_REQUEST["forward_email"] == "on" ? '<a href="https://domains.google.com/registrar#z=e&d=3471834,tilde.team&chp=z,d">yes</a>' : "no";
|
|
||||||
|
|
||||||
$msgbody = "<h1>New tilde.team signup</h1>
|
$msgbody = "<h1>tilde.team signup</h1>
|
||||||
<hr>
|
<hr>
|
||||||
Desired username: <strong>{$_REQUEST["username"]}</strong><br>
|
desired username: <strong>{$_REQUEST["username"]}</strong><br>
|
||||||
Contact email: <strong><a href=\"mailto:{$_REQUEST["email"]}\">{$_REQUEST["email"]}</a></strong><br>
|
contact email: <strong><a href=\"mailto:{$_REQUEST["email"]}\">{$_REQUEST["email"]}</a></strong><br>
|
||||||
Reason: <strong>{$_REQUEST["interest"]}</strong><br>
|
reason: <strong>{$_REQUEST["interest"]}</strong><br>
|
||||||
Forward mail?: <strong>$forwardmail</strong><br>
|
forward mail?: <strong>$forwardmail</strong><br>
|
||||||
SSH Key: <pre>{$_REQUEST["sshkey"]}</pre>";
|
ssh key: <pre>{$_REQUEST["sshkey"]}</pre>";
|
||||||
|
|
||||||
if (mail('bharrismac@gmail.com', 'tilde.team signup', $msgbody, $headers)) {
|
$message = (new Swift_Message('tilde.team signup'))
|
||||||
echo '<div class="alert alert-success" role="alert">
|
->setFrom(['sys@tilde.team' => 'tilde'])
|
||||||
email sent! i\'ll get back to you soon with login instructions! <a href="/">back to tilde.team home</a>
|
->setTo(['admin@tilde.team'])
|
||||||
</div>';
|
->setReplyTo([$_REQUEST["email"]])
|
||||||
} else {
|
->setBody($msgbody, 'text/html');
|
||||||
echo 'The email has failed! Send me a message manually at <a href="mailto:ben@tilde.team">ben@tilde.team</a>';
|
|
||||||
}
|
$result = $mailer->send($message);
|
||||||
|
|
||||||
|
echo '<div class="alert alert-success" role="alert">
|
||||||
|
email sent! i\'ll get back to you soon with login instructions! <a href="/">back to tilde.team home</a>
|
||||||
|
</div>';
|
||||||
} else {
|
} else {
|
||||||
?>
|
?>
|
||||||
<div class="alert alert-warning" role="alert">
|
<div class="alert alert-warning" role="alert">
|
||||||
|
@ -142,7 +133,5 @@
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</body>
|
<?php include __DIR__.'/../footer.php';
|
||||||
</html>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue