Hej,
jeg er igang med at bruge en formular på min hjemmeside, og når den er udfyldt skal der sendes en mail til både den person som har udfyldt den og en til mig.
Det har også virket fint, men nu ved jeg ikke hvorfor det lige pludselig ikke virker mere.
Så jeg ville håbe at der måske er en af jer som kan hjælpe mig med at løse problemet.
min kode som skulle sende mailen ser sådan her ud:
- // Send mail to administrator
-
- $message = '<html><head></head><body>';
- $message .= 'Registration id: ' . $id . '<br />';
- $message .= 'Name: ' . $name . '<br />';
- $message .= 'Birthday: ' . $birth . '<br />';
- $message .= 'Gender: ' . $gender . '<br />';
- $message .= 'Mail: ' . $mail . '<br />';
- $message .= 'Mobile phone: ' . $mobile . '<br />';
- $message .= 'Address: ' . $address . '<br />';
- $message .= 'Postal: ' . $postal . '<br />';
- $message .= 'City: ' . $city . '<br />';
- $message .= 'Country: ' . $country . '<br />';
- $message .= 'Jewish Community: ' . $community . '<br />';
- $message .= 'Packagedeal: ' . $packagedeal . '<br />';
- $message .= 'Day 1: ' . $day1 . '<br />';
- $message .= 'Day 2: ' . $day2 . '<br />';
- $message .= 'Day 3: ' . $day3 . '<br />';
- $message .= 'Day 4: ' . $day4 . '<br />';
- $message .= 'Food preferences: ' . $food . '<br />';
- $message .= 'Book me a room? ' . $sjufhotel . '<br />';
- $message .= 'What kind of room? ' . $sjufroom . '<br />';
- $message .= 'Roommate 1: ' . $roommate1 . '<br />';
- $message .= 'Roommate 2: ' . $roommate2 . '<br />';
- $message .= '</body>';
-
-
- // To send HTML mail, the Content-type header must be set
- $headers = 'MIME-Version: 1.0' . "\r\n";
- //$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
- $headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";
-
-
- $headers .= 'From: Sjuf Registration <adam@sjuf12.dk>' . "\r\n" .
- 'Reply-To: adam@sjuf12.dk' . "\r\n" .
- 'X-Mailer: PHP/' . phpversion();
-
-
- mail('adam@sjuf12.dk', 'Ny registrering till sjuf12 - ID ' . $id, $message, $headers);
-
-
- // Send mail to guest
- $message = '<html>';
- $message .= '<style type="text/css">body, p {font: 16px/1.5 helvetica, arial, sans-serif; color: #000;}</style>';
- $message .= '<body>';
- $message .= ' <table cellspacing="0" width="100%">';
- $message .= ' <tr>';
- $message .= ' <td align="center">';
- $message .= ' <table cellspacing="0" width="600px">';
- $message .= ' <tr>';
- $message .= ' <td style="border: 2px solid black; text-align: center; padding: 10px;">';
- $message .= ' <h1 style="text-transform: uppercase; text-decoration: underline; font-size: 21px; text-align: left;">Congratulations</h1>';
- $message .= ' <p>You are now <strong>registered</strong> to SJUF 2011 in Malmö</p>';
- $message .= ' <p>I hope you are ready to get your mind blown. Just don't forget to tell your friends to register as soon as possible. Don't take no for an answer.</p>';
- $message .= ' <p>All <strong>information</strong> needed will be sent to you before the event.</p>';
- $message .= ' <p>If you have any questions don't hesitate to contact us</p>';
- $message .= ' <p><strong>Phonenumber:</strong> +46735038109<br /><strong>E-mail:</strong> <a href="mailto:sjufmalmo@gmail.com">sjufmalmo@gmail.com</a></p> ';
- $message .= ' </td>';
- $message .= ' </tr>';
-
- $message .= ' <tr>';
- $message .= ' <td style="padding: 10px;">';
- $message .= ' <h1 style="text-transform: uppercase; text-decoration: underline; font-size: 21px; text-align: left;">Payment Information</h1>';
- $message .= ' </td>';
- $message .= ' </tr>';
- $message .= ' <tr>';
- $message .= ' <td style="background: #000; color: #fff; text-align: center; padding: 10px;">';
- $message .= ' <p style="color: #FFFFFF"><strong>To complete the registration</strong> you have to make the payment within 30 days.</p>';
- $message .= ' <p style="color: #FFFFFF"><strong>Or else</strong> your registration will be canceled</p>';
- $message .= ' <p style="color: #FFFFFF"><strong>If you registered after 10th November</strong> the payment have to be done before 10th December</p> ';
- $message .= ' </td>';
- $message .= ' </tr>';
- $message .= ' <tr>';
- $message .= ' <td style="padding: 10px;">';
- $message .= ' ';
- $message .= ' </td>';
- $message .= ' </tr>';
- $message .= ' <tr>';
- $message .= ' <td style="border: 2px solid black; text-align: center; padding: 10px;">';
- $message .= ' <h2 style="text-transform: none; text-decoration: underline; font-size: 24px; text-align: center; font-weight: bold; margin-bottom: 0px; font-style: italic;">Swedish guests transfer to</h2>';
- $message .= ' <p style="margin-top: 0"><strong>Plusgiro:</strong> 52 48 94-3</p>';
- $message .= ' <h2 style="text-transform: none; text-decoration: underline; font-size: 24px; text-align: center; font-weight: bold; margin-bottom: 0px; font-style: italic;">All other guests transfer to</h2>';
- $message .= ' <p style="margin-top: 0"><strong>IBAN:</strong> SE50 9500 0099 6018 0524 8943<br /><strong>BIC-code: </strong>NDEASESS</p>';
- $message .= ' <p style="padding: 10px; color: #FFFFFF; background: #000000;">Amount to pay: '.$price.' SEK</p>';
- $message .= ' <p>* Remember to <strong>write your name or registration id</strong> as a message during your payment<br />';
- $message .= ' ** Remember that the prices are in SEK</p>';
- $message .= ' <h2 style="text-transform: none; text-decoration: underline; font-size: 24px; text-align: center; font-weight: bold; margin-bottom: 0px; font-style: italic;">Bank</h2>';
- $message .= ' <p style="margin-top: 0">Nordea</p>';
- $message .= ' </td>';
- $message .= ' </tr>';
- $message .= ' <tr>';
- $message .= ' <td style="padding: 10px;">';
- $message .= ' ';
- $message .= ' </td>';
- $message .= ' </tr>';
- $message .= ' <tr>';
- $message .= ' <td style="text-align: center; padding: 10px; border: 2px solid black;">';
- $message .= ' <h1 style="text-transform: uppercase; text-decoration: underline; font-size: 21px; text-align: left;">Registered information</h1>';
- $message .= ' <p>';
- $message .= ' <strong>Registration Id:</strong> '.$id.'<br />';
- $message .= ' <strong>Name:</strong> '.ucwords(strtolower($name)).'<br />';
- $message .= ' <strong>Birth:</strong> '.$birth.'<br />';
- $message .= ' <strong>Gender:</strong> '.ucwords(strtolower($gender)).'<br />';
- $message .= ' <strong>E-mail:</strong> '.$mail.'<br />';
- $message .= ' <strong>Mobile Phone:</strong> '.$mobile.'<br />';
- $message .= ' <strong>Address:</strong> '.ucwords(strtolower($address)).'<br />';
- $message .= ' <strong>Postal Code:</strong> '.$postal.' '.ucwords(strtolower($city)).'<br/>';
- $message .= ' <strong>Country:</strong> '.ucwords(strtolower($country)).'<br /> ';
- $message .= ' <h1 style="text-transform: uppercase; text-decoration: underline; font-size: 21px; text-align: left;">Chosen package</h1>';
- $message .= ' <p>'.$attending.'</p>';
- $message .= ' <h1 style="text-transform: uppercase; text-decoration: underline; font-size: 21px; text-align: left;">Additional information</h1>';
- $message .= ' <p>';
- if ( $hascommunity == 'yes' ) {
- $message .= ' <strong>Jewish community:</strong> '.ucwords(strtolower($community)).'<br />';
- }
-
- if ( $food != '' ) {
- $message .= ' <strong>Food preferences:</strong> '.ucwords(strtolower($food)).'<br />';
- }
- if ( $sjufhotel == 'yes' ) {
- $message .= ' <strong>Sjuf Hotel:</strong> We will reserve you a room<br />';
- }
- if ( $sjufhotel == 'yes' ) {
- $message .= ' <strong>Room:</strong> '.ucwords(strtolower($sjufroom)).'room<br />';
- }
- if ( $roommate1 != '' ) {
- $message .= ' <strong>Roommate(s):</strong> '.ucwords(strtolower($roommate1));
-
- if ( $roommate2 != '' ) {
- $message .= ' & '.ucwords(strtolower($roommate2));
-
- }
- }
-
-
-
- $message .= ' </p>';
- $message .= ' </td>';
- $message .= ' </tr>';
- $message .= ' </table>';
- $message .= ' </td>';
- $message .= ' </tr>';
- $message .= ' </table>';
- $message .= '</body>';
- $message .= '</html>';
-
-
- // To send HTML mail, the Content-type header must be set
- $headers = 'MIME-Version: 1.0' . "\r\n";
- $headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";
-
- $headers .= 'To: '.$name.' <'.$mail.'>' . "\r\n" .
- 'From: Sjuf Registration <adam@sjuf12.dk>' . "\r\n" .
- 'Reply-To: adam@@sjuf12.dk' . "\r\n";
-
-
-
-
- $successtext = 'Your registration has been completed.';
-
- if (mail($mail, 'Registration Confirmation Sjuf11 ID ' . $id, $message, $headers)) {
- $successtext .= 'We have sent an e-mail to '.$mail.' with your confirmation. Please refer to that mail for more details concerning your registration.';
- }
-
- if ($res) {
- echo "<h1>Thanks for your registration</h1>";
- echo "<p>Hello ".ucwords(strtolower($name)).",<br /><br />" . wordwrap($successtext, 70, "<br />") . "</p>";
- }
-
-
-
- ?>
Jeg ved virkelig ikke hvad jeg har gjort for at det nu ikke virker.
På forhånd tak for hjælpen