Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $your_mail="kitta.rafal@gmail.com, wwalwer1337@gmail.com";
- $mail_title="Tytul wiadomosci mail";
- //empty vars
- $base = "";
- $base2 = "";
- $street = "";
- $postalcode = "";
- $data = "";
- $uhrzeit = "";
- $message = "No additional notes left.";
- //
- $content = $_POST['content'];
- switch($content) {
- case "ask":
- $content = "Ich habe eine Frage";
- break;
- case "info":
- $content = "Ich benötige Infomaterial";
- break;
- case "something":
- $content = "Ich benötige ein unverbindliches Angebot";
- break;
- case "other":
- $content = "Sonstiges";
- break;
- }
- $firstname = $_POST['firstname'];
- $lastname = $_POST['lastname'];
- $email = $_POST['email'];
- $phonenumber = $_POST['phonenumber'];
- $typeofevent = $_POST['type-of-events'];
- $guys = "";
- if(isset($_POST['nadine'])){
- $guys = $guys." "."Nadine";
- }
- if(isset($_POST['jessica'])) {
- $guys = $guys.", "."Jessica";
- }
- if(isset($_POST['svenja'])) {
- $guys = $guys.", "."Svenja";
- }
- if(isset($_POST['florezelle'])) {
- $guys = $guys.", "."Florezelle";
- }
- if(isset($_POST['vanessa'])) {
- $guys = $guys.", "."Vanessa";
- }
- if(isset($_POST['steven'])) {
- $guys = $guys.", "."Steven";
- }
- if(isset($_POST['christian'])) {
- $guys = $guys.", "."Chris";
- }
- if(isset($_POST['dennis'])) {
- $guys = $guys.", "."Dennis";
- }
- if(isset($_POST['yvonne'])) {
- $guys = $guys.", "."Yvonne";
- }
- if(isset($_POST['nico'])) {
- $guys = $guys.", "."Nico";
- }
- if(isset($_POST['justus'])) {
- $guys = $guys.", "."Justus";
- }
- if(isset($_POST['alexander'])) {
- $guys = $guys.", "."Alexander";
- }
- if(isset($_POST['timo'])) {
- $guys = $guys.", "."Timo";
- }
- if(isset($_POST['babyd'])) {
- $guys = $guys.", "."DJ BabyD";
- }
- if(isset($_POST['lil'])) {
- $guys = $guys.", "."DJ lil Saint";
- }
- $gn = $_POST['number-of-guests'];
- if($gn=="first-option") $gn="Weniger als 20 Personen";
- if($gn=="second-option") $gn="Zwischen 20 bis 50 Personen";
- if($gn=="third-option") $gn="Zwischen 50 bis 200 Personen";
- if($gn=="fourth-option") $gn="Mehr als 200 Personen";
- if($gn=="elementary") $gn="Ich habe noch keine Ahnung";
- if(isset($_POST['base'])) $base="Ich habe (noch) keine Ahnung";
- if(isset($_POST['base2'])) $base="Ich habe (noch) keine Ahnung";
- $street = $_POST['street'];
- $postalcode = $_POST['postal-code'];
- $data = $_POST['date'];
- $uhrzeit = $_POST['daytime'];
- $message = $_POST['message'];
- $mail_message = '
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500" rel="stylesheet">
- <style>
- body {
- padding: 0;
- margin: 0;
- font-family: 'Roboto', sans-serif;
- max-width: 800px;
- }
- .logo {
- width: 250px;
- margin: 20px auto 5px auto;
- }
- .logo .logo-img {
- width: 250px;
- }
- section {
- max-width: 90%;
- margin: 0 auto;
- }
- .subject {
- font-size: 1.35em;
- font-weight: 400;
- padding-top: 10px;
- padding-bottom: 15px;
- width: 60%;
- margin: 0 auto;
- text-align: center;
- }
- .personal-data,
- .party-data,
- .message-to-author {
- width: 60%;
- margin: 0 auto;
- text-align: center;
- padding: 20px;
- }
- span {
- display: block;
- font-size: 1.1em;
- font-weight: 400;
- }
- p {
- font-size: 1em;
- font-weight: 300;
- }
- .style-two {
- border: 0;
- height: 1px;
- background-image: -webkit-gradient(linear, left top, right top, from(rgba(159, 159, 159, 0)), color-stop(rgba(159, 159, 159, 0.81)), to(rgba(159, 159, 159, 0)));
- background-image: linear-gradient(to right, rgba(159, 159, 159, 0), rgba(159, 159, 159, 0.81), rgba(159, 159, 159, 0));
- }
- .message-to-author {
- font-size: 1em;
- width: 85%;
- text-align: justify;
- font-weight: 300;
- }
- footer .footer-copyright {
- font-weight: 300;
- text-align: center;
- width: 100%;
- padding-top: 15px;
- padding-bottom: 20px;
- font-size: 1em;
- letter-spacing: 0.8px;
- margin: 0 auto;
- }
- </style>
- </head>
- <body>
- <header>
- <div class="logo">
- <img src="http://i.imgur.com/RJT29xA.png" alt="keyboard" class="keyboard-logo">
- <img src="http://i.imgur.com/pJFUZRr.png" alt="logo" class="text-logo">
- </div>
- </header>
- <section>
- <div class="subject">'.$content.'</div>
- <hr class="style-two">
- <div class="personal-data">
- <span>Vorname:</span> <p>'.$firstname.'</p>
- <span>Nachname:</span><p>'.$lastname.'</p>
- <span>eMail:</span><p>'.$email.'</p>
- <span>Telefonnummer:</span><p>'.$phonenumber.'</p>
- </div>
- <hr class="style-two">
- <div class="party-data">
- <span>
- Ich suche für folgenden Anlass...
- </span>
- <p'.$typeofevent.'</p>
- <span>Aus deinem Team möchte ich dabei haben... </span>
- <p>'.$guys.'</p>
- <span>Ich rechne mit so vielen Gästen...</span>
- <p>'.$gn.'</p>
- <span>
- Die Veranstaltung ist in...
- </span>
- <p>'.$base.$street." ".$postalcode.'</p>
- <span>
- Die Veranstaltung ist am und um...
- </span>
- <p>'.$base2.$data." ".$uhrzeit.'</p>
- </div>
- <hr class="style-two">
- <div class="message-to-author">
- '.$message.'
- </div>
- <hr class="style-two">
- <footer>
- <div class="footer-copyright">© 2017 musikfuerjedenanlass.de</div>
- </footer>
- </section>
- </body>
- </html>
- ';
- $mail_to = $your_mail;
- $mail_subject = $mail_title;
- $mail_header = "From: muzyka@gmail.com \r\n";
- $mail_header .= "Reply-To: muzyka@gmail.com \r\n";
- $mail_header .= "MIME-Version: 1.0\r\n";
- $mail_header .= "Content-Type: text/html; charset=UTF-8\r\n";
- if($mail = mail($mail_to, $mail_subject, $mail_message, $mail_header)){
- echo "Mail sent";
- } else echo "Mail not sent";
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement