WEB Please Help w/ converting this PHP to JSP

Discussion in 'OT Technology' started by nubian, Mar 9, 2008.

  1. nubian

    nubian Active Member

    Joined:
    Aug 11, 2003
    Messages:
    27,761
    Likes Received:
    1
    here is the script.
    thanks in advance.

    Code:
    <?
    if(!empty($HTTP_POST_VARS['sms_smsTo']) && !empty($HTTP_POST_VARS['sms_taMessage']))
    {
    	$to = stripslashes($HTTP_POST_VARS['sms_smsTo']);
    	$subject = stripslashes($HTTP_POST_VARS['sms_Subject']);
    	$body = stripslashes($HTTP_POST_VARS['sms_taMessage']);
    	//$body .= "\n\n---------------------------\n";
    	//$body .= "Mail sent by: " . $HTTP_POST_VARS['sms_From'] . " <" . $HTTP_POST_VARS['sms_From']  . ">\n";
    	$header = "From: " . $HTTP_POST_VARS['sms_From'] . " <" . $HTTP_POST_VARS['sms_From'] . ">\n";
    	//$header .= "Reply-To: " . $HTTP_POST_VARS['sms_From'] . " <" . $HTTP_POST_VARS['sms_From'] . ">\n";
    	$header .= "X-Mailer: PHP/" . phpversion() . "\n";
    	$header .= "X-Priority: 3";
    	if(@mail($to, $subject, $body, $header))
    	{
    		echo "output=sent";
    	} else {
    		echo "output=error";
    	}
    } else {
    	echo "output=error";
    }
    ?>
     
  2. Limp_Brisket

    Limp_Brisket New Member

    Joined:
    Jan 2, 2006
    Messages:
    48,422
    Likes Received:
    0
    Location:
    Utah
    you're welcome

    Code:
    <?JSP
    if(!empty($HTTP_POST_VARS['sms_smsTo']) && !empty($HTTP_POST_VARS['sms_taMessage']))
    {
    	$to = stripslashes($HTTP_POST_VARS['sms_smsTo']);
    	$subject = stripslashes($HTTP_POST_VARS['sms_Subject']);
    	$body = stripslashes($HTTP_POST_VARS['sms_taMessage']);
    	//$body .= "\n\n---------------------------\n";
    	//$body .= "Mail sent by: " . $HTTP_POST_VARS['sms_From'] . " <" . $HTTP_POST_VARS['sms_From']  . ">\n";
    	$header = "From: " . $HTTP_POST_VARS['sms_From'] . " <" . $HTTP_POST_VARS['sms_From'] . ">\n";
    	//$header .= "Reply-To: " . $HTTP_POST_VARS['sms_From'] . " <" . $HTTP_POST_VARS['sms_From'] . ">\n";
    	$header .= "X-Mailer: PHP/" . phpversion() . "\n";
    	$header .= "X-Priority: 3";
    	if(@mail($to, $subject, $body, $header))
    	{
    		echo "output=sent";
    	} else {
    		echo "output=error";
    	}
    } else {
    	echo "output=error";
    }
    ?>
     
  3. nubian

    nubian Active Member

    Joined:
    Aug 11, 2003
    Messages:
    27,761
    Likes Received:
    1
    i see what you did there.
    if it were only that easy.
     

Share This Page