check submit > send email ######################################################################## if( (isset($_GET['sendout'])) and ($_GET['sendout'] == 1) ) { if( (!empty($form_name)) and (!empty($form_email)) and (!empty($form_comment)) and (!empty($form_emailabs)) ) { # check both email addresses ######################################################################## if( (checkmail($form_email) != 1) or (checkmail($form_emailabs) != 1) ) { $formcheck = "missfields"; # check optional email addresses ######################################################################## } elseif( ( (!empty($form_email_optional[0])) and (checkmail($form_email_optional[0]) != 1) ) or ( (!empty($form_email_optional[1])) and (checkmail($form_email_optional[1]) != 1) ) or ( (!empty($form_email_optional[2])) and (checkmail($form_email_optional[2]) != 1) ) ) { $formcheck = "missfields"; } else { # email content ######################################################################## $message = "Empfehlung von " . $form_name . "...\n\n Hallo,\n bitte besuchen Sie unsere Website. Bitte klicken Sie hier: -> http://" . $website . " \n *************************************************************************** Kommentar von " . $form_name . " zu dieser Empfehlung:\n " . $form_comment . " ***************************************************************************\n Wir freuen uns auf Ihren Besuch!\n Freundliche Grüße, MBA-Gate.de Team\n"; # notify email content ######################################################################## $message_notify = "Empfehlung von " . $form_name . " (" . $form_emailabs . ")...\n\n Nutzer Kommentar: *************************************************************************** " . $form_comment . " ***************************************************************************\n"; # send out first email ######################################################################## $mail_to = $form_email; $mail_subject = 'Empfehlung von ' . $form_name; $mail_header = 'From: ' . $form_name . ' <' . $form_emailabs . '>'; mail($mail_to,$mail_subject,$message,$mail_header); # send out optional emails ######################################################################## foreach ($form_email_optional as $key => $value) { if(!empty($value)) { $mail_to = $value; $mail_subject = 'Empfehlung von ' . $form_name; $mail_header = 'From: ' . $form_name . ' <' . $form_emailabs . '>'; mail($mail_to,$mail_subject,$message,$mail_header); } } header("Location: http://" . $website . "/tell-a-friend/thank-you-popup.html"); # send out notify email ######################################################################## $mail_to = $website_email; $mail_subject = 'Empfehlung ' . $form_name . ' ' . $form_emailabs; $mail_header = 'From: MBA-Gate.de <' . $form_emailabs . '>'; mail($mail_to,$mail_subject,$message_notify,$mail_header); } } else { $formcheck = "missfields"; } } ?>
![]() |
Empfehlen Sie uns weiterBitte füllen Sie alle Felder aus um Ihre Empfehlung abzusenden. Vielen Dank! Hinweis: Es werden keine Daten gespeichert, außer Sie melden sich für unseren Newsletter seperat an! Bitte füllen Sie alle Felder aus und prüfen Sie alle E-Mail-Adressen! |
![]() |