-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.php
75 lines (74 loc) · 3.3 KB
/
index.php
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
<!doctype html>
<html><!-- InstanceBegin template="/Templates/basis.dwt.php" codeOutsideHTMLIsLocked="false" -->
<head>
<?php require_once('ssi/head.php'); ?>
<!-- InstanceBeginEditable name="doctitle" -->
<title>PHPmailer homepage</title>
<!-- InstanceEndEditable -->
<!-- InstanceBeginEditable name="head" -->
<!-- InstanceEndEditable -->
</head>
<body>
<!-- Menu Horizontal -->
<?php require_once('ssi/navigatie.php'); ?>
<div id="main" class="container" ><!-- InstanceBeginEditable name="data" -->
<div class="page-header col-sm-12">
<h1>PHPMailer <small>inleiding</small></h1>
</div>
<div class="col-md-8">
<p><span id="result_box" lang="nl">PHPMailer is een code bibliotheek om veilig en gemakkelijk e-mails te verzenden via php.</span></p>
<h3><span lang="nl">Hoe ga je te werk?</span></h3>
<ul>
<li>Controleer het basispad <strong>$basisURL</strong> in <strong>ssi/head.php</strong><br>
<pre>
$serverName = $_SERVER['SERVER_NAME'];
switch($serverName){
// Testserver met subfolder PHP_email
case 'localhost':
$basisURL = '/PHP_email';
break;
// Productieserver zonder subfolder
default:
$basisURL = '';
}
</pre></li>
<li>Download de PHPMailer bibliotheek via <a href="https://github.com/Synchro/PHPMailer">https://github.com/Synchro/PHPMailer</a></li>
<li>Leg een verwijzing naar <strong>PHPMailerAutoload.php</strong><br>
<code>
require_once('ssi/mail.config.php');
</code></li>
<li>Bepaal de voor u meest geschikte <a href="configTest.php">SMTP configuratie</a>.</li>
<li>Bewaar deze configuratie in <strong>ssi/mail.config.php.<br>
</strong>(Alle voorbeelden uit deze website maken gebruik van dezelfde configuratie.)</li>
<li>Leg een verwijzing naar <strong>ssi/mail.config.php.</strong>.</li>
<code>
require_once('PHPMailer/PHPMailerAutoload.php');
</code> <li>Vervolledig het mailscript aan de hand van bijgevoegde voorbeelden.
</li>
</ul>
<h3>LET OP: zenden via Gmail kan, maar...</h3>
<ul>
<li>Zet "<a href="https://myaccount.google.com/security#connectedapps">Apps met lagere beveiliging toestaan</a>:" AAN</li>
<li>Beveiliging via laatste <a href="https://support.google.com/mail/answer/45938?hl=nl">accountactiviteit</a></li>
<li><a href="https://support.google.com/mail/answer/22370?hl=nl">E-mail verzenden vanaf een ander adres of een alias</a></li>
</ul>
<h3>GMail: webserver reageert met "Authentication failed"</h3>
<ul>
<li>Je moet de webserver nog toegang verlenen op Gmail.</li>
<li>Ga naar: <a href="https://support.google.com/mail/answer/14257">https://support.google.com/mail/answer/14257</a></li>
<li>Volg de link <a href="https://accounts.google.com/DisplayUnlockCaptcha">https://accounts.google.com/DisplayUnlockCaptcha</a></li>
<li>Klik op Doorgaan.</li>
<li>Probeer nu opnieuw te zenden via de website.</li>
</ul>
</div>
<div class="col-md-4">
<p><a href="https://github.com/Synchro/PHPMailer"><img class="img-responsive img-rounded" src="assets/phpmailer.png" alt="PHPmailer logo"></a></p>
<ul>
<li><a href="https://github.com/Synchro/PHPMailer">https://github.com/Synchro/PHPMailer</a></li>
<li><a href="http://phpmailer.github.io/PHPMailer/">http://phpmailer.github.io/PHPMailer/</a></li>
</ul>
<p> </p>
</div>
<!-- InstanceEndEditable --></div>
</body>
<!-- InstanceEnd --></html>