summaryrefslogtreecommitdiff
path: root/tutors
diff options
context:
space:
mode:
Diffstat (limited to 'tutors')
-rw-r--r--tutors/email/index.php174
1 files changed, 117 insertions, 57 deletions
diff --git a/tutors/email/index.php b/tutors/email/index.php
index badb4eb..cb4602f 100644
--- a/tutors/email/index.php
+++ b/tutors/email/index.php
@@ -1,13 +1,3 @@
-<!--
- set up mail forwarding from existing tutor emails to personal emails (one-way)
-- disable dnssec on google domains
-- unlock google domain
-- transfer to porkbun via ui with google domains token; approve transfer on google domains
-- clone 53hor.net DNS records into porkbun domain
-- turn on dnssec for porkbun domain
-- turn on ssl certificate generation for porkbun domain
--->
-
<?php include('../../header.php'); ?>
<section class="banner">
@@ -17,11 +7,19 @@
<section class="quiet flexible">
<div>
<p>
- Every tutor is expected to use a @carpentertutoring.com email address to facilitate client communication. This guide will walk you through setting up your email from scratch and configuring your mail client to use it.
+ Every tutor is expected to use a <em>@carpentertutoring.com</em> email address to facilitate client communication. This guide will walk you through setting up your email from scratch and configuring your mail client to use it.
+ </p>
+
+ <p>
+ You have two options for using your new email address. The first is <em>standalone</em> which allows you to use the mail client of your choice to send and receive mail. Some popular desktop clients are Apple's Mail app, Mozilla Thunderbird, and Microsoft Outlook. Popular mobile mail clients include the iOS Mail app and K-9 Mail for Android. Your mailbox will remain on the Carpenter Tutoring mail server and in no way interact with any personal or private mail accounts you have on other systems.
</p>
<p>
- You have two options for using your new email address. The first is <em>standalone</em> which allows you to use the mail client of your choice to send and receive mail. Some popular desktop clients are Apple's Mail app, Mozilla Thunderbird, and Microsoft Outlook. Popular mobile mail clients include the iOS Mail app and K-9 Mail for Android.
+ Your second choice is <em>forwarding</em>, where all of your Carpenter Tutoring mail will forward to a personal email address of your choice. Your personal email provider will need to be configured to send mail as your Carpenter Tutoring address for any client communication. The amount of setup is the same, but this method allows you to use a client such as <em>GMail</em> for managing mail.
+ </p>
+
+ <p>
+ Remember you can change your decision anytime. See "Getting help" below.
</p>
<?php
@@ -29,77 +27,139 @@
?>
<h2>Create a mail account</h2>
<form method="post" action="/tutors/email/index.php#submit">
- <label for="email">Your Carpenter Tutoring email address
- <input type="email" name="email" placeholder="firstnamelastinitial@carpentertutoring.com" pattern=".*@carpentertutoring.com$" required />
+ <label for="name">Your full name
+ <input type="text" name="name" placeholder="Amy Carpenter" required />
</label>
<label for="password">Your new Carpenter Tutoring email password
<input type="password" name="password" minlength="8" placeholder="8 character minimum" required />
</label>
- <input type="submit" value="View your mail config" />
+ <label for="forward">Personal email address for forwarding
+ <input type="email" name="forward" placeholder="leave blank to use a standalone mail client" />
+ </label>
+
+ <button type="submit" class="button" alt="submit">Set me up</button>
</form>
<?
}
?>
<?php
- if (!empty($_POST['password'])) {
+ if (!empty($_POST['password']) && !empty($_POST['name'])) {
+ // encrypt email and add to logins queue
+ $descriptorspec = array(
+ 0 => array('pipe', 'r'),
+ 1 => array('file', '/tmp/ct_logins', 'a'),
+ 2 => array('file', '/var/log/ct_mail_submit.log', 'a')
+ );
+ $process = proc_open('smtpctl encrypt', $descriptorspec, $pipes);
+ fwrite($pipes[0], $_POST['password']);
+ fclose($pipes[0]);
+
+ // include name and generated email in logins queue
+ $logins_queue = fopen('/tmp/ct_logins', 'a');
+ fprintf($logins_queue, '\n%s\n', $_POST['name']);
+
+ $names = explode(' ', strtolower($_POST['name']));
+
+ $last = $names[1][0];
+ $first = $names[0];
+ $email = "$first$last@carpentertutoring.com";
+ fprintf($logins_queue, '%s\n\n', $email);
+
+ // close queue
+ fclose($logins_queue);
?>
- <h2 id="submit">Connection details</h2>
+ <h2 id="submit">Configuring your mail client</h2>
+
+ Thank you! Now we're setting up your mailbox. Once it's ready you may begin configuring your mail client based on the method you chose above. If you're unable to complete the below steps due to authentication issues, please wait 24 hours and try again. If you have questions or difficulty, see "Getting help" below.
+
+ <?php
+ if (empty($_POST['forward'])) {
+ ?>
+ <h3>Standalone mail</h3>
+
+ <p>
+ Instructions for configuring a mail client vary somewhat based on the application. Regardless of the client you choose, the "Connection details" below will be the same. Save them for future use, or in case your <em>@carpentertutoring.com</em> address isn't ready yet.
+ </p>
- <pre>
+ <p>
+ <ul>
+ <li><a href="https://support.apple.com/en-us/HT201320">iOS Mail app</a></li>
+ <li><a href="https://support.microsoft.com/en-us/office/set-up-email-in-the-mail-app-7ff79e8b-439b-4b47-8ff9-3f9a33166c60">Mail app for Windows 10 or Windows 11</a></li>
+ <li><a href="https://support.mozilla.org/en-US/kb/manual-account-configuration">Mozilla Thunderbird</a></li>
+ </ul>
+ </p>
+
+ <h3>Connection details</h2>
+ <p>
+ Note that if you already have an email address which we've communicated to you, use that instead of the one provided below as your username.
+ </p>
+
+ <pre>
SMTP server: mail.53hor.net
Connection security: STARTTLS
Authentication method: normal password
SMTP port: 587
-SMTP username: <?php printf($_POST['email']) ?>
+SMTP password: (use the password you just submitted)
+SMTP username: <?php printf('%s', $email) ?>
-Password: use the password you just submitted
IMAP server: mail.53hor.net
Connection security: STARTTLS
Authentication method: normal password
IMAP port: 143
-IMAP username: <?php printf($_POST['email']) ?>
-
-Password: use the password you just submitted
-
+IMAP password: (use the password you just submitted)
+IMAP username: <?php printf('%s', $email) ?>
</pre>
- <?php
+ <?php
+ } else {
+ ?>
+ <h3>Gmail forwarding</h3>
+
+ <p>
+ Once your <em>@carpentertutoring.com</em> email address is created, you will begin receiving forwarded email in your Gmail inbox. Sending mail from your <em>@carpentertutoring.com</em> address via Gmail requires a small amount of setup.
+ </p>
+
+ <p>
+
+ <ol>
+ <li>On your computer, open <a href="https://mail.google.com" target="_blank">Gmail</a>.</li>
+ <li>In the top right, click settings (⚙️) and then <em>See all settings</em>.</li>
+ <li>Click the <em>Accounts and import</em> or <em>Accounts</em> tab.</li>
+ <li>In the "Send mail as" section, click <em>Add another email address</em>.</li>
+ <li>Enter your name and the address you want to send from. This will be your <em>@carpentertutoring.com</em> address. Leave the "Treat as an alias" box checked.</li>
+ <li>Click <em>Next Step</em>.</li>
+ <li>For the "SMTP server" enter <em>mail.53hor.net</em>. Select <em>587</em> for the port.</li>
+ <li>For the username and password you will enter your new Carpenter Tutoring address (with "@carpentertutoring.com" suffix) and the password you submitted in the previous step.</li>
+ <li>Check "Secured connection using TLS (recommended)" and click <em>Add Account</em>.</li>
+ <li>Gmail will prompt you to verify your new address. You should receive a confirmation code in your inbox, forwarded from your <em>@carpentertutoring.com</em> address. Use it to complete the alias setup.</li>
+ <li>Return to the "Send mail as" section on the settings page and look for "When replying to a message." Check "Reply from the same address the message was sent to." This will ensure you respond to tutoring inquiries with your Carpenter Tutoring address and personal mail with your Gmail address.</li>
+
+ </ol>
+ </p>
+
+ <h3>Other webmail clients</h3>
+
+ <p>
+ Setup instructions for other popular webmail clients are largely the same. The configuration options for IMAP and SMTP should be identical. Below is a list of setup instructions for common providers.
+ </p>
+ <p>
+ <ul>
+ <li><a href="https://support.microsoft.com/en-gb/office/add-or-remove-an-email-alias-in-outlook-com-459b1989-356d-40fa-a689-8f285b13f1f2">Outlook.com (MS Hotmail)</a></li>
+ <li><a href="https://support.apple.com/guide/icloud/add-and-manage-email-aliases-mm6b1a490a/icloud">iCloud.com (Apple iCloud)</a></li>
+
+ </ul>
+ </p>
+ <?php
+ }
}
- ?>
- <h2>Optional Gmail forwarding</h2>
-
- <h3>Receiving Mail</h3>
-
- <p>
- Once your <a href="#">carpentertutoring.com</a> email address is created, you will begin receiving forwarded email in your Gmail inbox.
- </p>
-
- <h3>Sending mail from Gmail</h3>
-
- <p>
- Sending mail from your <a href="#">carpentertutoring.com</a> address via Gmail requires a small amount of setup.
- </p>
-
- <p>
-
- <ol>
- <li>On your computer, open <a href="https://mail.google.com" target="_blank">Gmail</a>.</li>
- <li>In the top right, click settings (⚙️) and then <em>See all settings</em>.</li>
- <li>Click the <em>Accounts and import</em> or <em>Accounts</em> tab.</li>
- <li>In the "Send mail as" section, click <em>Add another email address</em>.</li>
- <li>Enter your name and the address you want to send from. This will be your <a href="#">carpentertutoring.com</a> address. Leave the "Treat as an alias" box checked.</li>
- <li>Click <em>Next Step</em>.</li>
- <li>For the "SMTP server" enter <em>mail.53hor.net</em>. Select <em>587</em> for the port.</li>
- <li>For the username and password you will enter your new Carpenter Tutoring address (with "@carpentertutoring.com" suffix) and the password you submitted in the previous step.</li>
- <li>Check "Secured connection using TLS (recommended)" and click <em>Add Account</em>.</li>
- <li>Gmail will prompt you to verify your new address. You should receive a confirmation code in your inbox, forwarded from your <a href="#">carpentertutoring.com</a> address. Use it to complete the alias setup.</li>
- <li>Return to the "Send mail as" section on the settings page and look for "When replying to a message." Check "Reply from the same address the message was sent to." This will ensure you respond to tutoring inquiries with your Carpenter Tutoring address and personal mail with your Gmail address.</li>
-
- </ol>
- </p>
+ ?>
+ <h2>Getting help</h2>
+ <p>
+ If you encounter difficulty or have questions throughout any part of this process, please reach out to <a href="webmaster@carpentertutoring.com">webmaster@carpentertutoring.com</a> and we'll get in touch to help.
+ </p>
</div>
</section>