summaryrefslogtreecommitdiff
path: root/tutors/email/index.php
blob: 1a100b3d900dff9bcde1c5df5b1231963b74ce20 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
<?php include('../../header.php'); ?>

<section class="banner">
	<h1>Email setup</h1>
</section>

<section class="quiet flexible">
	<div>
		<p>
			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>
			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
		if (empty($_POST['password'])) {
		?>
			<h2>Create a mail account</h2>
			<form method="post" action="/tutors/email/index.php#submit">
				<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>

				<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']) && !empty($_POST['name'])) {
			// encrypt email and add to logins queue
			$descriptorspec = array(
				0 => array('pipe', 'r'),
				1 => array('file', '/var/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('/var/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">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>

				<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 password: (use the password you just submitted)
SMTP username: <?php printf('%s', $email) ?>


IMAP server: mail.53hor.net
Connection security: STARTTLS
Authentication method: normal password
IMAP port: 143
IMAP password: (use the password you just submitted)
IMAP username: <?php printf('%s', $email) ?>
</pre>
				<?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>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>

<?php include('../../footer.php'); ?>