Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <style type="text/css">
- body {text-align:center; }
- .error
- {
- width: 300px;
- height: 200px;
- text-align: center;
- position: absolute;
- left: 50%;
- top: 50%;
- margin-left: -150px;
- margin-top: -100px;
- font-size: 32px;
- font-variant: bold;
- color: red;
- font-family: Arial;
- }
- .erfolg
- {
- width: 300px;
- height: 200px;
- text-align: center;
- position: absolute;
- left: 50%;
- top: 50%;
- margin-left: -150px;
- margin-top: -100px;
- font-size: 32px;
- font-variant: bold;
- color: green;
- font-family: Arial;
- }
- </style>
- <?php
- if ($_GET['name'] <> "" & $_GET['Klasse'] <> "" & $_GET['LvL'] <> "" & $_GET['Gearscore'] <> "" & $_GET['jn'] <> "")
- {
- $ich = $_GET['name'];
- require 'PHPMailerAutoload.php';
- $mail = new PHPMailer;
- //$mail->SMTPDebug = 3; // Enable verbose debug output
- $mail->isSMTP(); // Set mailer to use SMTP
- $mail->Host = 'send.one.com'; // Specify main and backup SMTP servers
- $mail->SMTPAuth = true; // Enable SMTP authentication
- $mail->Username = 'email@example.de'; // SMTP username
- $mail->Password = 'secret'; // SMTP password
- $mail->SMTPSecure = 'tls'; // Enable TLS encryption, `ssl` also accepted
- $mail->Port = 587; // TCP port to connect to
- $mail->setLanguage('de', 'languages/'); // To load the German version
- $mail->setFrom('email@example.de', 'Nodewar Anmeldung');
- //$mail->addAddress('email@example.de', 'Joe User'); // Add a recipient
- $mail->addAddress('email@example.de'); // Name is optional
- //$mail->addReplyTo('email@example.de', 'Information');
- $mail->addReplyTo('email@example.de');
- //$mail->addCC('cc@example.com');
- //$mail->addBCC('bcc@example.com');
- //$mail->addAttachment('/var/tmp/file.tar.gz'); // Add attachments
- //$mail->addAttachment('/tmp/image.jpg', 'new.jpg'); // Optional name
- $mail->isHTML(true); // Set email format to HTML
- $mail->Subject = 'Newsletter Anmeldung';
- $mail->Body = nl2br($_GET["name"]).'<br>Klasse: '.$_GET["Klasse"].'<br>Level: '.$_GET["LvL"].'<br>Gearscore: '.$_GET["Gearscore"].'<br>Macht mit: '.$_GET["jn"];
- $mail->AltBody = 'Bitte einen anderen Browser oder Email-Client benutzen !';
- if(!$mail->send()) {
- echo 'Fehler beim Versenden !';
- echo 'Mailer Error: ' . $mail->ErrorInfo;
- } else {
- echo '<div class="erfolg">Vielen Danke für die Anmeldung !</br><meta http-equiv="refresh" content="5; URL=https://www.google.de"></div>';
- }
- }
- else
- {
- echo "<div class='error'>Es wurden nicht alles Felder ausgefüllt, bitte erneut versuchen ! </br><a href='index.html'>Zurück</a></div>";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement