399 // Get all the headers without the From: portion
400 // so that we can do something fancy if the first
401 // attempt to send the message fails
402 $headers_without_from =
403 "Reply-To: {$_POST['eM']}" . CC_FB_SENDMAIL_EOL .
404 "Return-Path: {$_POST['eM']}" . CC_FB_SENDMAIL_EOL .
405 "$cc$bcc" .
406 'Message-ID: " . CC_FB_S
ENDMAIL_EOL .
407 'X-Mailer: PHP v' . phpversion() . CC_FB_SENDMAIL_EOL .
408 $form_owner_headers;
409
410 // Send a message to the form's owner with the end-user's
email
411 // as the reply-to address.
412 if(CC_FB_DO_EMAIL &&
413 !(mail($mail_to,$subject, $form_owner_msg,
414 "From: {$_POST['eM']}" . CC_FB_SENDMAIL_EOL .
415 $headers_without_from)) &&
416 !(mail($mail_to,$subject, $form_owner_msg,
417 'From: CoffeeCup Flash Form Builder ' .
418 "" . CC_FB_SENDM
AIL_EOL .
419 $headers_without_from)))
420 {
421 printMessage('Unable To Send E-Mail',
422 "We're sorry but we were unable to send your e-mail.
" .
423 'If you are sure that you entered all your email
' .
424 'addresses properly, you should contact your serv
er ' .
425 'administrator.');
426 }
427
428 // If necesarry, send a message to the end-user as well.
429 if(CC_FB_AUTO_REPLY)
430 {
431 $form_user_msg = parseMessage('Hello [FirstName] [LastN
ame],
432
433 Thank you for your form submission!
434 A representative will respond in 4-5 business days.