Creation of Mail Forms -- From HTML page

Hi all,
I have a basic question wrt the creation of MAIL FORMS in SAP CRM.
Our client creates Email communication content in HTML format. And the requirement is to use these HTML files for creation of Mail Forms (on a very frequent basis)
While creating Mail Forms there is an Option to UPLOAD HTML file. Can we upload HTML files to create the MAIL FORMS
We tried doing the same but the files after upload got distorted and the result was not as desired. Should the HTML file exist in a defined format before upload in SAP CRM mail form?
Thanks.
Regards,
SAURABH

Hi Surabh,
Use HTML codes in notepad. Use the notepad to upload the file and create mail form. You should follow W3C standard. Refer note 1131645.
BR, Sathish R

Similar Messages

  • Mail-form from dB Masters + reCaptcha - Things wont work the way i want.

    I used a mail-form from dB Masters because someone here gave me the tip.
    And its great! But it uses a simplefied Captcha script.
    I tryd to change the code myself and got to this: http://www.wientjesvoegwerk.nl/PHP/form.php
    If you try to send mail it wont work.....
    form.php
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Email Form</title>
    </head>
    <body>
    <center>
    <form id="form" method="post" action="../formmailer.php" enctype="multipart/form-data">
    <input type="hidden" name="action" value="verify">
    <table cellpadding="4">
    <tr><td  style="text-align: left;" valign=top><font size="2" FACE="Verdana" color="#000000">Uw naam:</font><small><span style="color:#E00000;" title="Required field">*</span></small></td><td align="left">
    <input type="text" name="Naam" value=""/>
    </td></tr>
    <tr><td  style="text-align: left;" valign=top><font size="2" FACE="Verdana" color="#000000">Email:</font><small><span style="color:#E00000;" title="Required field">*</span></small></td><td align="left">
    <input type="text" name="Email" value="" />
    </td></tr>
    <tr><td  style="text-align: left;" valign=top><font size="2" FACE="Verdana" color="#000000">Telefoonnummer:</font><small><span style="color:#E00000;" title="Required field">*</span></small></td><td align="left">
    <input type="text" name="Telefoonnummer" value="" />
    </td></tr>
    <tr><td  style="text-align: left;" valign=top><font size="2" FACE="Verdana" color="#000000">Onderwerp:</font><small><span style="color:#E00000;" title="Required field">*</span></small></td><td align="left">
    <select name="Onderwerp">
        <option value="0">Algemene Informatie</option>
        <option value="1">Offerte</option>
        <option value="2">Overige</option>
        </select>
    </td></tr>
    <tr><td  style="text-align: left;" valign=top><font size="2" FACE="Verdana" color="#000000">Bericht:</font><small><span style="color:#E00000;" title="Required field">*</span></small></td><td align="left">
    <textarea name="Bericht" rows="7" cols="40"></textarea>
    </td></tr>
    <tr><td align=right>CAPTCHA TXT</td>
    <td align="left">
    <form method="post" action="verify.php">
       <?php
         require_once('recaptchalib.php');
         $publickey = "I hide the key on this forum dont know if its ok to show";
         echo recaptcha_get_html($publickey);
       ?>
    </form>
    </td>
    </tr>
    <tr><td></td><td align="left">
    <input type="submit" name="submit" value="Submit" />
    <input type="reset" name="Reset" value="Clear Form" />
    <input type="hidden" name="config" value="0" />
    <input type="hidden" name="nospam" value="" />
    </td></tr>
    </table>
    <div style="height:1px; display: none; visibility: hidden;">
    <input type="text" name="email">
    </div>
    </form>
    </center>
    </body>
    </html>
    formmailer.php
    <?php
    // dB Masters' PHP FormM@iler, Copyright (c) 2007 dB Masters Multimedia
    // http://www.dbmasters.net/
    // FormMailer comes with ABSOLUTELY NO WARRANTY
    // Licensed under the AGPL
    // See license.txt and readme.txt for details
    // General Variables
         $check_referrer="no";
         $referring_domains="www.wientjesvoegwerk.nl";
    // options to use if hidden field "config" has a value of 0
    // recipient info
         $charset[0]="UTF-8";
         $tomail[0]="[email protected]";
         $cc_tomail[0]="";
         $bcc_tomail[0]="";
    // Mail contents config
         $subject[0]="Onderwerp van de Email";
         $reply_to_field[0]="Email";
         $reply_to_name[0]="Naam";
         $required_fields[0]="Naam,Email,Telefoonnummer,Onderwerp,Bericht";
         $required_email_fields[0]="Email";
         $attachment_fields[0]="";
         $return_ip[0]="yes";
         $mail_intro[0]="Er is een bericht gestuurd vanuit Wientjesvoegwerk.nl:";
         $mail_fields[0]="Naam,Email,Telefoonnummer,Onderwerp,Bericht";
         $mail_type[0]="text";
         $mail_priority[0]="1";
         $allow_html[0]="no";
    // Send back to sender config
         $send_copy[0]="yes";
         $copy_format[0]="vert_table";
         $copy_fields[0]="Naam,Onderwerp,Bericht";
         $copy_attachment_fields[0]="";
         $copy_subject[0]="Kopie van uw bericht naar Wientjesvoegwerk.nl";
         $copy_intro[0]="Dank u voor uw bericht!<br />Om veiligheidsredenen is uw email adres en telefoonnummer niet in deze mail te zien.<br /> Het volgende is verstuurd;";
         $copy_from[0]="[email protected]";
         $copy_tomail_field[0]="Email";
    // Result options
         $header[0]="";
         $footer[0]="";
         $error_page[0]="";
         $thanks_page[0]="";
    // Default Error and Success Page Variables
         $error_page_title[0]="Errors:";
         $error_page_text[0]="Ga a.u.b. terug naar de vorige pagina om alle benodigde velden in te vullen.";
         $thanks_page_title[0]="Bericht verzonden.";
         $thanks_page_text[0]="Dank u voor uw bericht!";
    // Antispam Options
         $empty_field[0]="nospam";
         $character_scan[0]="Bericht,Naam,Email,Telefoonnummer,Onderwerp";
         $time_delay[0]="2";
         $captcha_codes[0]="9C2449,EEADC8,77A585,D72838";
         $max_urls[0]="2";
         $max_url_fields[0]="Bericht";
         $flag_spam[0]="";
    // options to use if hidden field "config" has a value of 1
    // recipient info
         $charset[1]="";
         $tomail[1]="";
         $cc_tomail[1]="";
         $bcc_tomail[1]="";
    // Mail contents config
         $subject[1]="";
         $reply_to_field[1]="";
         $reply_to_name[1]="";
         $required_fields[1]="";
         $required_email_fields[1]="";
         $attachment_fields[1]="";
         $return_ip[1]="";
         $mail_intro[1]="";
         $mail_fields[1]="";
         $mail_type[1]="";
         $mail_priority[1]="";
         $allow_html[1]="";
    // Send back to sender config
         $send_copy[1]="";
         $copy_format[1]="";
         $copy_fields[1]="";
         $copy_attachment_fields[1]="";
         $copy_subject[1]="";
         $copy_intro[1]="";
         $copy_from[1]="";
         $copy_tomail_field[1]="";
    // Result options
         $header[1]="";
         $footer[1]="";
         $error_page[1]="";
         $thanks_page[1]="";
    // Default Error and Success Page Variables
         $error_page_title[1]="";
         $error_page_text[1]="";
         $thanks_page_title[1]="";
         $thanks_page_text[1]="";
    // Antispam Options
         $empty_field[1]="bait";
         $character_scan[1]="Naam,Email,Telefoonnummer,Onderwerp,Bericht";
         $time_delay[1]="";
         $captcha_codes[1]="";
         $max_urls[1]="";
         $max_url_fields[1]="";
         $flag_spam[1]="";
    // Don't muck around past this line unless you know what you are doing //
    ob_start();
    $config=$_POST["config"];
    $debug=0;
    $debug_text="";
    // fix for Windows email server security
    ini_set("sendmail_from",$tomail[$config]);
    // email validation regular expression
    $regex = "^[-a-z0-9!#$%&\'*+/=?^_`{|}~]+(\.[-a-z0-9!#$%&\'*+/=?^_`{|}~]+)*@(([a-z0-9]([-a-z0-9]*[a-z0-9]+)?){1,63}\.)+([a-z]([-a-z0-9]*[a-z0-9]+)?){2,63}$";
    $header_injection_regex = "(\r|\n)";
    if($header[$config]!="")
         include($header[$config]);
    if($_POST["submit"] || $_POST["Submit"] || $_POST["submit_x"] || $_POST["Submit_x"])
    // begin global functions //
    // get visitor IP
         function getIP()
              if(getenv(HTTP_X_FORWARDED_FOR))
                   $user_ip=getenv("HTTP_X_FORWARDED_FOR");
              else
                   $user_ip=getenv("REMOTE_ADDR");
              return $user_ip;
    // get value of given key
         function parseArray($key)
              $arrayvalue=$_POST[$key];
              $count=1;
              extract($array_value);
              foreach($array_value as $part_value)
                   if($count > 1){$value.=", ";}
                   $value.=$part_value;
                   $count=$count+1;
              return $value;
    // stripslashes and autolink url's
         function parseValue($value)
              $value=preg_replace("/(http:\/\/+.[^\s]+)/i",'<a href="\\1">\\1</a>', $value);
              return $value;
    // html header if used
         function htmlHeader()
              $htmlHeader="<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\">\n<html>\n<head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=".$charset[$config]."\"></head>\n<body>\n<table cellpadding=\"2\" cellspacing=\"0\" border=\"0\" width=\"600\">\n";
              return $htmlHeader;
    // html footer if used
         function htmlFooter()
              $htmlFooter="</table>\n</body>\n</html>\n";
              return $htmlFooter;
    // build verticle table format
         function buildVertTable($fields, $intro, $to, $send_ip)
              $message=htmlHeader();
              if($intro != "")
                   $message.="<tr>\n<td align=\"left\" valign=\"top\" colspan=\"2\">".$intro."</td>\n</tr>\n";
              $fields_check=preg_split('/,/',$fields);
              $run=sizeof($fields_check);
              for($i=0;$i<$run;$i++)
                   $cur_key=$fields_check[$i];
                   $curvalue=$_POST[$cur_key];
                   if(is_array($cur_value))
                        $curvalue=parseArray($cur_key);
                   $curvalue=parseValue($cur_value);
                   if($allow_html[$config]=="no")
                        $curvalue=htmlspecialchars(nl2br($cur_value));
                   else
                        $curvalue=nl2br($cur_value);
                   $message.="<tr>\n<td align=\"left\" valign=\"top\" style=\"white-space:nowrap;\"><b>".$cur_key."</b></td>\n<td align=\"left\" valign=\"top\" width=\"100%\">".$cur_value."</td>\n</tr>\n";
              if($send_ip=="yes" && $to=="recipient")
                   $user_ip=getIP();
                   $message.="<tr>\n<td align=\"left\" valign=\"top\" style=\"white-space:nowrap;\"><b>Sender IP</b></td>\n<td align=\"left\" valign=\"top\" width=\"100%\">".$user_ip."</td>\n</tr>\n";
              $message.=htmlFooter();
              return $message;
    // build horizontal table format
         function buildHorzTable($fields, $intro, $to, $send_ip)
              $message=htmlHeader();
              $fields_check=preg_split('/,/',$fields);
              $run=sizeof($fields_check);
              if($intro != "")
                   $message.="<tr>\n<td align=\"left\" valign=\"top\" colspan=\"".$run."\">".$intro."</td>\n</tr>\n";
              $message.="<tr>\n";
              for($i=0;$i<$run;$i++)
                   $cur_key=$fields_check[$i];
                   $message.="<td align=\"left\" valign=\"top\" style=\"white-space:nowrap;\"><b>".$cur_key."</b></td>\n";
              if($send_ip=="yes" && $to=="recipient")
                   $message.="<td align=\"left\" valign=\"top\" style=\"white-space:nowrap;\"><b>Sender IP</b></td>\n";
              $message.="</tr>\n";
              $message.="<tr>\n";
              for($i=0;$i<$run;$i++)
                   $cur_key=$fields_check[$i];
                   $curvalue=$_POST[$cur_key];
                   if(is_array($cur_value))
                        $curvalue=parseArray($cur_key);
                   $curvalue=parseValue($cur_value);
                   if($allow_html[$config]=="no")
                        $curvalue=htmlspecialchars(nl2br($cur_value));
                   else
                        $curvalue=nl2br($cur_value);
                   $message.="<td align=\"left\" valign=\"top\">".$cur_value."</td>\n";
              $message.="</tr>\n";
              $message.="<tr>\n";
              if($send_ip=="yes" && $to=="recipient")
                   $user_ip=getIP();
                   $message.="<td align=\"left\" valign=\"top\">".$user_ip."</td>\n";
              $message.="</tr>\n";
              $message.=htmlFooter();
              return $message;
    // build plain text format
         function buildTextTable($fields, $intro, $to, $send_ip)
              $message="";
              if($intro != "")
                   $message.=$intro."\n\n";
              $fields_check=preg_split('/,/',$fields);
              $run=sizeof($fields_check);
              for($i=0;$i<$run;$i++)
                   $cur_key=$fields_check[$i];
                   $curvalue=$_POST[$cur_key];
                   if(is_array($cur_value))
                        $curvalue=parseArray($cur_key);
                   $curvalue=parseValue($cur_value);
                   if($allow_html[$config]=="no")
                        $curvalue=htmlspecialchars($cur_value);
                   else
                        $curvalue=$cur_value;
                   $message.="".$cur_key.": ".$cur_value."\n";
              if($send_ip=="yes" && $to=="recipient")
                   $user_ip=getIP();
                   $message.="Sender IP: ".$user_ip."\n";
              return $message;
    // get the proper build fonction
         function buildTable($format, $fields, $intro, $to, $send_ip)
              if($format=="vert_table")
                   $message=buildVertTable($fields, $intro, $to, $send_ip);
              else if($format=="horz_table")
                   $message=buildHorzTable($fields, $intro, $to, $send_ip);
              else
                   $message=buildTextTable($fields, $intro, $to, $send_ip);
              return $message;
    // referrer checking security option
         function checkReferer()
              if($check_referrer=="yes")
                   $ref_check=preg_split('/,/',$referring_domains);
                   $ref_run=sizeof($ref_check);
                   $referer=$_SERVER['HTTP_REFERER'];
                   $domain_chk="no";
                   for($i=0;$i<$ref_run;$i++)
                        $cur_domain=$ref_check[$i];
                        if(stristr($referer,$cur_domain)){$domain_chk="yes";}
              else
                   $domain_chk="yes";
              return $domain_chk;
    // checking required fields and email fields
         function checkFields($text_fields, $email_fields, $regex)
               $error_message="";
              if($debug==1)
                   $error_message.="<li>text_fields: ".$text_fields."<br />email_fields: ".$email_fields."<br />reply_to_field: ".$reply_to_field."<br />reply_to_name: ".reply_to_name."</li>";
              if($text_fields != "")
                   $req_check=preg_split('/,/',$text_fields);
                   $req_run=sizeof($req_check);
                   for($i=0;$i<$req_run;$i++)
                        $cur_field_name=$req_check[$i];
                        $cur_field=$_POST[$cur_field_name];
                        if($cur_field=="")
                             $error_message.="<li>You are missing the <b>".$req_check[$i]."</b> field</li>\n";
              if($email_fields != "")
                   $email_check=preg_split('/,/',$email_fields);
                   $email_run=sizeof($email_check);
                   for($i=0;$i<$email_run;$i++)
                        $cur_email_name=$email_check[$i];
                        $cur_email=$_POST[$cur_email_name];
                        if($cur_email=="" || !eregi($regex, $cur_email))
                             $error_message.="<li>You are missing the <b>".$email_check[$i]."</b> field or it is not a valid email address.</li>\n";
              return $error_message;
    // attachment function
         function getAttachments($attachment_fields, $message, $content_type, $border)
              $att_message="This is a multi-part message in MIME format.\r\n";
              $att_message.="--{$border}\r\n";
              $att_message.=$content_type."\r\n";
              $att_message.="Content-Transfer-Encoding: 7bit\r\n\r\n";
              $att_message.=$message."\r\n\r\n";
              $att_check=preg_split('/,/',$attachment_fields);
              $att_run=sizeof($att_check);
              for($i=0;$i<$att_run;$i++)
                   $fileatt=$_FILES[$att_check[$i]]['tmp_name'];
                   $fileatt_name=$_FILES[$att_check[$i]]['name'];
                   $fileatt_type=$_FILES[$att_check[$i]]['type'];
                   if (is_uploaded_file($fileatt))
                        $file=fopen($fileatt,'rb');
                        $data=fread($file,filesize($fileatt));
                        fclose($file);
                        $data=chunk_split(base64_encode($data));
                        $att_message.="--{$border}\n";
                        $att_message.="Content-Type: {$fileatt_type}; name=\"{$fileatt_name}\"\r\n";
                        $att_message.="Content-Disposition: attachment; filename=\"{$fileatt_name}\"\r\n";
                        $att_message.="Content-Transfer-Encoding: base64\r\n\r\n".$data."\r\n\r\n";
              $att_message.="--{$border}--\n";
              return $att_message;
    // function to set content type
         function contentType($charset, $format)
              if($format=="vert_table")
                   $content_type="Content-type: text/html; charset=".$charset."\r\n";
              else if($format=="horz_table")
                   $content_type="Content-type: text/html; charset=".$charset."\r\n";
              else
                   $content_type="Content-type: text/plain; charset=".$charset."\r\n";
              return $content_type;
    // end global functions //
    // begin procedural scripting //
         // anti-spam empty field check
         if($_POST[$empty_field[$config]] != "")
              $empty_message = "<li>This submission failed and was flagged as spam.</li>\n";
         // anti-spam character scan check
         if(strlen($character_scan[$config]) > 0)
              $spam_message="";
              $field_check=preg_split('/,/',$character_scan[$config]);
              $field_run=sizeof($field_check);
              for($i=0;$i<$field_run;$i++)
                   $cur_field_name=$field_check[$i];
                   $cur_field=$_POST[$cur_field_name];
                   if(preg_match("/<(.|\n)+?>/", $cur_field) || preg_match("/\[(.|\n)+?\]/", $cur_field))
                        $spam_message.="<li>This message contains disallowed characters.</li>\n";
         // anti-spam time delay check
         if((strlen($time_delay[$config]) > 0 && strlen($_POST["time"]) > 0) || (strlen($time_delay[$config]) > 0 && (strlen($_POST["time"]) == 0 || !$_POST["time"])))
              if((time() - $_POST["time"]) < $time_delay[$config])
                   $time_message = "<li>This has been stopped by the timer, and is likely spam.</li>\n";
         // anti-spam CAPTCHA check
         if(strlen($captcha_codes[$config]) > 0)
              $captcha_check=preg_split('/,/',$captcha_codes[$config]);
              if(strtolower($_POST["captcha_entry"]) != strtolower($captcha_check[$_POST["captcha_code"]]))
                   $captcha_message = "<li>CAPTCHA test did not match.</li>\n";
         // anti-spam max URL check
         if(strlen($max_url_fields[$config]) > 0)
              $max_url_message="";
              $field_check=preg_split('/,/',$max_url_fields[$config]);
              $field_run=sizeof($field_check);
              for($i=0;$i<$field_run;$i++)
                   $cur_field_name=$field_check[$i];
                   $cur_field=$_POST[$cur_field_name];
                   preg_match_all("/http:/", $cur_field, $matches);
                   if(count($matches[0]) > $max_urls[$config])
                        $max_url_message.="<li>This message contains too many URL's.</li>\n";
         // set anti-spam flagging option
         if(strlen($empty_message.$spam_message.$time_message.$captcha_message.$max_url_message) > 0 && strlen($flag_spam[$config]) == 0)
              $set_flag = 2;
         else if(strlen($empty_message.$spam_message.$time_message.$captcha_message.$max_url_message) > 0 && strlen($flag_spam[$config]) > 0)
              $set_flag = 1;
         else
              $set_flag = 0;
         // header injection check
            $security_filter="";
         if(strlen($_POST[$reply_to_field[$config]]) > 0)
              if(eregi($header_injection_regex,$_POST[$reply_to_field[$config]]))
                   $security_filter.="<li>Header injection attempt detected, mail aborted.</li>\n";
              else
                   $reply_to_field_checked=$_POST[$reply_to_field[$config]];
         if(strlen($_POST[$reply_to_name[$config]]) > 0)
              if(eregi($header_injection_regex,$_POST[$reply_to_name[$config]]))
                   $security_filter.="<li>Header injection attempt detected, mail aborted.</li>\n";
              else
                   $reply_to_name_checked=$_POST[$reply_to_name[$config]];
         // check domain referrer and continue
         $domain_chk=checkReferer();
         if($domain_chk=="yes")
              $error_message=checkFields($required_fields[$config], $required_email_fields[$config], $regex);
              if(strlen($error_message) < 1 && strlen($security_filter) < 1 && $set_flag < 2)
                   // build appropriate message format for recipient
                   $content_type=contentType($charset[$config], $mail_type[$config]);
                   $message=buildTable($mail_type[$config], $mail_fields[$config], $mail_intro[$config], "recipient", $return_ip[$config]);
                   // build header data for recipient message
                   //$extra="From: ".$_POST[$reply_to_field[$config]]."\r\n";
                   $extra="From: ".$reply_to_name_checked." <".$reply_to_field_checked.">\r\n";
                   if($cc_tomail[$config]!="")
                        $extra.="Cc: ".$cc_tomail[$config]."\r\n";
                   if($bcc_tomail[$config]!="")
                        $extra.="Bcc: ".$bcc_tomail[$config]."\r\n";
                   if($mail_priority[$config]!="")
                        $extra.="X-Priority: ".$mail_priority[$config]."\r\n";
                   // get attachments if necessary
                   if($attachment_fields[$config]!="")
                        $semi_rand=md5(time());
                        $border="==Multipart_Boundary_x{$semi_rand}x";
                        $extra.="MIME-Version: 1.0\r\n";
                        $extra.="Content-Type: multipart/mixed; boundary=\"{$border}\"";
                        $message=getAttachments($attachment_fields[$config], $message, $content_type, $border);
                   else
                        $extra.="MIME-Version: 1.0\r\n".$content_type;
                   // send recipient email
                   if($debug==1)
                        if($set_flag == 1)
                             $debug_text.="<p><b>Mail would have sent flagged for spam if not in debug mode.</b></p>";
                        else
                             $debug_text.="<p><b>Mail would have sent if not in debug mode.</b></p>";
                   else if($debug==0)
                        if($set_flag == 1)
                             $subject = $flag_spam[$config]." ".$subject[$config];
                        else
                             $subject = $subject[$config];
                        mail("".$tomail[$config]."", "".stripslashes($subject)."", "".stripslashes($message)."", "".$extra."");
                   // autoresponse email if necessary
                   if($send_copy[$config]=="yes")
                        // build appropriate message format for autoresponse
                        $content_type=contentType($charset[$config], $copy_format[$config]);
                        $message=buildTable($copy_format[$config], $copy_fields[$config], $copy_intro[$config], "autoresponder", $return_ip[$config]);
                        // build header data for autoresponse
                        $copy_tomail=$_POST[$copy_tomail_field[$config]];
                        $copy_extra="From: ".$copy_from[$config]."\r\n";
                        // get autoresponse  attachments if necessary
                        if($copy_attachment_fields[$config]!="")
                             $semi_rand=md5(time());
                             $border="==Multipart_Boundary_x{$semi_rand}x";
                             $copy_extra.="MIME-Version: 1.0\r\n";
                             $copy_extra.="Content-Type: multipart/mixed; boundary=\"{$border}\"";
                             $message=getAttachments($copy_attachment_fields[$config], $message, $content_type, $border);
                        else
                             $copy_extra.="MIME-Version: 1.0\r\n".$content_type;
                        // send autoresponse email
                        if($debug==1)
                             if($set_flag == 1)
                                  $debug_text.="<p><b>Autoresponder would have sent flagged for spam if not in debug mode.</b></p>";
                             else
                                  $debug_text.="<p><b>Autoresponder would have sent if not in debug mode.</b></p>";
                        else if($debug==0)
                             $send_copy = 1;
                             if($copy_tomail=="" || !eregi($regex,$copy_tomail))
                                  $send_copy = 0;
                             if($send_copy == 1)
                                  if($set_flag == 1)
                                       $copy_subject = $flag_spam[$config]." ".$copy_subject[$config];
                                  else
                                       $copy_subject = $copy_subject[$config];
                                  mail("$copy_tomail", "".$copy_subject."", "$message", "$copy_extra");
                   // showing thanks pages from a successful submission
                   if($thanks_page[$config]=="")
                        echo "<h3>".$thanks_page_title[$config]."</h3>\n";
                        echo "<p>".$thanks_page_text[$config]."</p>\n";
                        if(strlen($debug_text) > 0)
                             echo "<p><b><i>".$debug_text."</i></b></p>\n";
                   else
                        header("Location: ".$thanks_page[$config]);
              else
                   // entering error page options from missing required fields
                   if($error_page[$config]=="")
                        echo "<h3>".$error_page_title[$config]."</h3>\n";
                        echo "<ul>\n";
                        echo $security_filter.$empty_message.$error_message.$spam_message.$time_message.$captcha_message.$max_url_message;
                        echo "</ul>\n";
                        echo "<p>".$error_page_text[$config]."</p>\n";
                   else
                        header("Location: ".$error_page[$config]);
         else
              echo "<h3>".$error_page_title[$config]."</h3>\n";
              // message if unauthorized domain trigger from referer checking option
              echo "<p>Sorry, mailing request came from an unauthorized domain.</p>\n";
    // end procedural scripting //
    else
         echo "<h3>Error</h3>";
         echo "<p>No form data has been sent to the script</p>\n";
    if($footer[$config]!="")
         include($footer[$config]);
    ob_end_flush();
    ?>
    verify.php
    <?php
    require_once('recaptchalib.php');
    $privatekey = "i hide this on the forum";
    $resp = recaptcha_check_answer ($privatekey,
                                   $_SERVER["REMOTE_ADDR"],
                                   $_POST["recaptcha_challenge_field"],
                                   $_POST["recaptcha_response_field"]);
    if (!$resp->is_valid) {
       // What happens when the CAPTCHA was entered incorrectly
       die ("The reCAPTCHA wasn't entered correctly. Go back and try it again." .
            "(reCAPTCHA said: " . $resp->error . ")");
    } else {
       // Your code here to handle a successful verification
    ?>
    We have a saying in the Netherlands; "Not being abled to see the tree's trough the forest"
    Well i dont see it anymore...
    I managed to get it in the code but it doesnt work.
    I hope someone can help me out!

    @Nancy O.
    Thanks for your support i appreciate it that you helped me out a many times.
    However i have read all of the topics you posted.
    I know in the mail form i can disable the "sort of Captcha". I wanted to disable it and insert reCaptcha instead.
    I will re-make the form because like you said (and i already figured it out myself) ;
    "b) Don't modify forms until you get a very basic form working on your server."
    And youre right, im taking too much work at once.
    @CowboyInAZ
    Im a hobbyist that learns really really fast.
    Before March 23 i never used CSS, Javascript and XHTML. And never combined them all together with PHP. (never ever created a php based file from scratch)
    The reason why i use other persons code is because i learn faster with examples, and because i dont need to reinvent the wheel if someone already invented it. The only thing i do with it is learn the workings, customise it and at last, rewrite the code when i understand it.
    If you look at my current site: http://www.wientjesvoegwerk.nl/
    You will notice that the site is validated by W3C with no errors and warnings.
    I think it was Nancy O. that gave me the link to the validator. Thats how i discovered the service.
    You need to know that in 1 day (from 63 errors and 12 warnings) i removed all errors. And i didnt knew much about it, and why errors happend while the site looks fine.
    So im just curious how things work and thats why i "steal" codes and adjust them to learn myself.
    I also want a education like you spoke of, but im interested in a different media.
    I want to be abled to create my dream project wich involves new ways for game studios to earn money.
    This is just a simple start, im also taking tutorials in C#, C++.

  • Drag and drop a image from html page into flex

    how can i drag a image form the html page and drop it into
    the flex application.

    Hi,
    There's no direct support for this. But you could implement
    drag and drop the way you normally would in javascript. Except
    here, on mouseUp over a div encapsulating the object or embed tag
    (the flash object), you'll need to make a call into actionscript
    from javascript indicating that a drag and drop happened.
    For more info, see
    how
    to drag and drop using javascript and
    actionscript
    and javascript communication

  • Read Text from HTML-Pages and want to solve "ChangedCharSetException"

    Hello,
    I have an app that connect via threads with pages and parse them an gives me only the Text-version of a HTML-page. Works fine, but if it found a page, where the text is within images, than the whole app stopps and gave me the message:
    javax.swing.text.ChangedCharSetException
            at javax.swing.text.html.parser.DocumentParser.handleEmptyTag(DocumentParser.java:169)
            at javax.swing.text.html.parser.Parser.startTag(Parser.java:372)
            at javax.swing.text.html.parser.Parser.parseTag(Parser.java:1846)
            at javax.swing.text.html.parser.Parser.parseContent(Parser.java:1881)
            at javax.swing.text.html.parser.Parser.parse(Parser.java:2047)
            at javax.swing.text.html.parser.DocumentParser.parse(DocumentParser.java:106)
            at javax.swing.text.html.parser.ParserDelegator.parse(ParserDelegator.java:78)
            at aufruf.main(aufruf.java:33)So I tried to catch them with "getCharSetSpec()" and "keyEqualsCharSet( )" from the class "javax.swing.text.ChangedCharSetException" and hoped that this solved the problem. But still doesen't work...
    Then I looked at the web and found, that I have to add the line:
    doc.putProperty("IgnoreCharsetDirective", new Boolean(true));"doc." is a new HTML Dokument, created with the HTMLEditorKit. I do not have much knowledge about that and so I hope, that someone can explain me, how I can solve that problem, within my code.
    Here we go:
    import javax.swing.text.*;
    import java.lang.*;
    import java.util.*;
    import java.net.*;
    import java.io.*;
    import javax.swing.text.html.*;
    import javax.swing.text.html.parser.*;
    public class myParser extends Thread
            private String name;
            public void run()
                    try
                            URL viele = new URL(name);                       // "name" ia a variable with a lot of links
                    URLConnection hs = viele.openConnection();
                    hs.connect();
                    if (hs.getContentType().startsWith("text/html"))
                            InputStream is = hs.getInputStream();
                            InputStreamReader isr = new InputStreamReader(is);
                            BufferedReader br = new BufferedReader(isr);
                            Lesen los = new Lesen();
                            ParserDelegator parser = new ParserDelegator();
                            parser.parse(br,los, false);
            catch (MalformedURLException e)
                    System.err.print("Doesn't work");
            catch (ChangedCharSetException e)
                    e.getCharSetSpec();
                    e.keyEqualsCharSet();
                    e.printStackTrace();
            catch (Exception o)
            public void vowi(String n)
                    name = n;
    }and for the case that it is important here is the class "Lesen"
    import java.net.*;
    import java.io.*;
    import javax.swing.text.*;
    import javax.swing.text.html.*;
    import javax.swing.text.html.parser.*;
    class Lesen extends HTMLEditorKit.ParserCallback
            public void handleStartTag(HTML.Tag t, MutableAttributeSet a, int pos)
                    try
                            if ((t==HTML.Tag.P) || (t==HTML.Tag.H1) || (t==HTML.Tag.H2) || (t==HTML.Tag.H3) || (t==HTML.Tag.H4) || (t==HTML.Tag.H5) || (t==HTML.Tag.H6))
                                    System.out.println();
                    catch (Exception q)
                            System.out.println(q.getMessage());
            public void handleSimpleTag(HTML.Tag t,MutableAttributeSet a, int pos)
                    try
                            if (t==HTML.Tag.BR)
                                    System.out.println(); // Neue Zeile
                                    System.out.println();
                    catch (Exception qw)
                            System.out.println(qw.getMessage());
            public void handleText(char[] data, int pos)
                    try
                            System.out.print(data);                                           // prints the text from HTML-pages
                    catch (Exception ab)
                            System.out.println(ab.getMessage());
    }Thanks a lot for helping...
    Stephan

    parser.parse(br,los, false);
    parser.parse(br,los, true);

  • Calling Oracle Standard Form from OAF page - Need to hide the find screen.

    Hi all,
    i have a requirement where i need to call a oracle standard form(D2K form) from OAF page and need to pass parameter. Now i can able to call a form from page on button click using the following syntax,
    "form:AR:US_AR_SUPER_USER:STANDARD:AR_ARXCWMAI_AGE"
    My query here is, When i call this form its open with find Form and after values are entered it goes the main form.
    I need to hide this find screen which is avaiable in standard and need to call directly the main form with out find form.
    Please help me out to reach this.
    Thanks in advance.
    Regards,
    Renu

    You need to pass the parameter to the actual form to display the results something like "form:AR:US_AR_SUPER_USER:STANDARD:AR_ARXCWMAI_AGE&P_PARAM=123", assuming P_PARAM is the actual parameter defined in the form. Open the form and check which parameters are available and pass the values accordingly.
    Thanks
    Shree

  • Parsing the FRAME tag from HTML pages

    Hello to everybody,
    I am trying to parse the A tags & the Frame tags from HTML pages. I have developed the code below, which works for the A tags but it does not work for the Frame tags. Is there any idea about this?
    private void getLinks() throws Exception {
         System.out.println(diskName);
    links=new ArrayList();
    frames=new ArrayList();
    BufferedReader rd = new BufferedReader(new FileReader(diskName));
    // Parse the HTML
    EditorKit kit = new HTMLEditorKit();
    HTMLDocument doc = (HTMLDocument)kit.createDefaultDocument();
    doc.putProperty("IgnoreCharsetDirective", new Boolean(true));
    try {
         kit.read(rd, doc, 0);
    catch (RuntimeException e) {return;}
    // Find all the FRAME elements in the HTML document, It finds nothing
         HTMLDocument.Iterator it = doc.getIterator(HTML.Tag.FRAME);
    while(it.isValid()) {
    SimpleAttributeSet s = (SimpleAttributeSet)it.getAttributes();
    String frameSrc = (String)s.getAttribute(HTML.Attribute.SRC);
         frames.add(frameSrc);
    // Find all the A elements in the HTML document, it works ok
    it = doc.getIterator(HTML.Tag.A);
    while (it.isValid()) {
    SimpleAttributeSet s = (SimpleAttributeSet)it.getAttributes();
    String link = (String)s.getAttribute(HTML.Attribute.HREF);
    int endOfSet=it.getEndOffset(),
    startOfSet=it.getStartOffset();
    String text=doc.getText(startOfSet,endOfSet-startOfSet);
    if (link != null)
         links.add(new Link(link,text));
    it.next();
    }

    Hello to everybody,
    I am trying to parse the A tags & the Frame tags from HTML pages. I have developed the code below, which works for the A tags but it does not work for the Frame tags. Is there any idea about this?
    private void getLinks() throws Exception {
         System.out.println(diskName);
    links=new ArrayList();
    frames=new ArrayList();
    BufferedReader rd = new BufferedReader(new FileReader(diskName));
    // Parse the HTML
    EditorKit kit = new HTMLEditorKit();
    HTMLDocument doc = (HTMLDocument)kit.createDefaultDocument();
    doc.putProperty("IgnoreCharsetDirective", new Boolean(true));
    try {
         kit.read(rd, doc, 0);
    catch (RuntimeException e) {return;}
    // Find all the FRAME elements in the HTML document, It finds nothing
         HTMLDocument.Iterator it = doc.getIterator(HTML.Tag.FRAME);
    while(it.isValid()) {
    SimpleAttributeSet s = (SimpleAttributeSet)it.getAttributes();
    String frameSrc = (String)s.getAttribute(HTML.Attribute.SRC);
         frames.add(frameSrc);
    // Find all the A elements in the HTML document, it works ok
    it = doc.getIterator(HTML.Tag.A);
    while (it.isValid()) {
    SimpleAttributeSet s = (SimpleAttributeSet)it.getAttributes();
    String link = (String)s.getAttribute(HTML.Attribute.HREF);
    int endOfSet=it.getEndOffset(),
    startOfSet=it.getStartOffset();
    String text=doc.getText(startOfSet,endOfSet-startOfSet);
    if (link != null)
         links.add(new Link(link,text));
    it.next();
    }

  • XMII Login from Html page

    Hi,
    how can we login in xMII from Html page? for example, if i give username and password in HTML page. that need to directly login in xMII? how can it do?
    - senthil

    Jeremy,
    When I use the following URL to open a specific page, it works.
    http://server/Lighthammer/Login.jsp?IllumLoginName=accountname&IllumLoginPassword=accountpassword&session=true&target=/Test/report.irpt
    Question:
    1) This URL opens the html or irpt page itself directly without the associated xMII navigation/menu and navigation bar. Is it possible to open the page with the associated xMII menu/navigation thro an URL

  • UTIL-PARAM STRING ERROR when calling a form from OAF Page

    Dear Experts,
    Can you please suggest, as we are getting the below error when we are calling a form from OAF page.
    "UTIL-PARAM STRING ERROR"
    We have created a button to call the same and the syntax used is as below.
    form:PA:OLNG_MOC_PROJECTS_ENGINEER:STANDARD:PA_PAXCARVW:PROJECT_NUMBER={@ProjectNumber}
    Thanks in advance,
    Satish

    Hi all,
    I have a Personalized Button, my button call a customized form (with a parameter named TAINV_PARAM). Function of customized Form is TAINV_FORM
    In OAF page, I have a text, it's values is 'TAINV', it's ID is VALUES_ATTRIBUTE (you can show source code in browser).
    In Destination URL of Personalized Button, fill code to call Customized Form:
    *javascript: var v_get_value=document.GetElementById(VALUES_ATTRIBUTE).innerHTML;openWindow(top, 'OA.jsp?OAFunc=TAINV_FORM&TAINV_PARAM'+v_get_value,null, {width:750, height:550},false, 'dialog', null);void(0);*
    Regards,
    TAINV

  • XMII Login from Html page under xMII Version 12

    Hi,
    I found this thread
    xMII Login from Html page
    but I'm not sure this will also work under xMII  Version 12.
    I have now this question:
    Is it possible to use a url login with loginname and password under xMII V12 similar this example for Version 11.5:
    http://server/Lighthammer/Login.jsp?IllumLoginName=accountname&IllumLoginPassword=accountpassword&session=true&target=/Test/report.irpt
    Many thanks in advance

    Hi,
    Has anyone had any luck with this - displaying a v12 MII screen without requiring login?
    We need to be able to do this as well in order to display read-only screens on large screen monitors on the manufacturing floor without requiring login to MII.
    Under v11.5 it worked with no issues.  Under v12, we haven't figured out how to do it yet.
    I've waded through the NetWeaver UME documentation, have searched through the NetWeaver forums, etc. but to this point have had no luck in making it work.
    We've tried enabling the UME Guest account, assigning Guest to the anonymous group and guest role (and xMII Users role), creating a Navigation for the Guest user, but still the NetWeaver login screen is displayed.
    MII experts - if you are aware of how to do this can you please give detailed instructions instead of just referencing the NetWeaver / UME documentation?
    Thank you for your help!

  • ExtendedScript from html page

    Hello,
    can i make script in the extendedScript toolkit(this script place document to indesign application) and run this script from html page?
    or is there integration between extendedscript and html?
    thanks

    HTML pages are usually displayed in web browsers, whose security model is designed specifically against any access to local resources, especially such calls to local applications.
    Besides to browsers, on the Mac, the "Dashboard" allows you to write little applications "widgets" exactly the way you're suggesting. It uses WebKit to display HTML.
    http://www.apple.com/downloads/dashboard/
    In order to communicate with extendscript, you'd have to go through the operating system's command line.
    http://developer.apple.com/documentation/AppleApplications/Conceptual/Dashboard_ProgTopics /Articles/CommandLine.html
    From there you'd invoke the scripting system with "OSAScript"
    http://developer.apple.com/documentation/Darwin/Reference/Manpages/man1/osascript.1.html
    then pass on your extendscript and arguments into InDesign via doScript.
    Another alternative to the main HTML browser is AIR, which also has an instance of WebKit for HTML display.
    http://livedocs.adobe.com/labs/air/1/quickstartshtml/
    Apparently it is possible to invoke BridgeTalk - the Creative Suite's inter application communication used by extendscript - straight from AIR. I don't yet have references how to do that, found the link below just yesterday.
    http://www.inthemod.com/bps/?p=165
    Dirk

  • How to send information from HTML page to JSP without reloading HTML page?

    Hello,
    Is it possible to send information(row number selected by user) from HTML page to JSP without reloading HTML page?
    Thanks.
    Oleg.

    Yes, you can do this with framesets and a hidden frame.
    You need a bit of JavaScritp in the "visible" frame that
    sets the location of the hidden frame to the JSP.
    Add the user's choice as a parameter to the JSP URL.

  • Get parameters from html page from java application standalone ...

    Hi all,
    I work in one solution that i have values in Html Page and i want get the parameters values from html and cath they in java application standalone.
    The Html page is in same host than de java application.
    I want know if this is possible. I wnat know if without HttpServlet i can get the parameters from Html Page pure.
    Thanks in Advance for the ideas,
    Antonio.

    Hi Abdul,
    The problem is my client want one solution where i have one page simple page Html and one application java standalone. This application runs in one machine, but we don't have web server. So the question is: Is possible without web server i can get the parameters values that is inside the html page from java application. I remember you that the application java is one .jar that run's with one command line from crontab "java -jar teste.jar".

  • Creation of fillable forms from existing HTML documents

    Hi All,
    I know this is doable, but I was wondering if someone could point me in the right direction or perhaps to an existing HowTo.
    I recently started working for a company in which part of my job duties includes the creation of new users and deauthinication of terminated user accounts. The company uses specific forms for accomplishing this that are filled out from templates in Outlook 2010, i.e. New Items-->More Items-->Choose Forms. This provides the users with a list of forms. By clicking on one of these forms it opens an e-mail that the requester populates.
    The issue we are having with this is that sometimes they use the form, and/or don't provide the right information. They will modify the form and delete certain row or columns etc. They also have a tendency to not provide all the mandatory information.
    I can take these forms and save them as HTML document from Outlook. What I would like to do is create them as fillable PDF forms with some fields as drop downs, other as mandatory and once they have completed the form correctly, (at least to the extent I can make it fool proof), then they can click on a button that will allow them to e-mail the completed form to the desired recipient admin group via outlook.
    The current method is the requester fills out the form then e-mails it to say their manager, who then types approved and sends it back, the requester then sends it to the next person until all the needed "approves" are received then it gets forwarded to a group who is basically the clearinghouse for all access requests who then send it to the appropriate systems admin group emails for completion. Once complete the admins do a reply all with users created or deauthinicated etc for systems xxx and xxx as requested at the top of the e-mail. 
    I want to make this process more standardized to prevent users from not completing the form correctly or modifying the Outlook form to their own interpretation of how the form should be or leaving out mandatory information.
    I would also like the form to automatically name itself with the employee number of the requestor with the date and time appended, i.e RM74651_10202014_0917 when they go to send it and place a copy of the completed form in a pre-specified network folder.
    Any information, suggestions or HowTo would be greatly appreciated.
    Thanks
    Gordon

    Hi Surabh,
    Use HTML codes in notepad. Use the notepad to upload the file and create mail form. You should follow W3C standard. Refer note 1131645.
    BR, Sathish R

  • Passing form data from html page to JSP page

    Hi,
    I have a simple HTML page with a form on it that sends the information to a JSP page that stores the form data in a JSP session. I created a simple form that asks for the user's name, sends it to the JSP page, stores that in a session, then sends it to another JSP page which displays the name. This worked fine.
    However, I added another input box to my form that asks for the user's age to do the same steps as outlined above. This does not work, and I'm not sure why. Here's the code from my HTML page:
    <form method=post action="savename.jsp">
    What's your name?
    <input type=text name=username size=20 />
    <p />
    What's your age?
    <input type=text name=age size=20 />
    <p />
    <input type=submit />Here's the code from my JSP page, savename.jsp (later on in the JSP page it links to another page, but that is not relevant):
    <%
    String name = request.getParameter("username");
    String age = request.getParamater("age");
    session.setAttribute("theName", name);
    session.setAttribute("theAge", age);
    %>Finally, here is the error message from Tomcat 6.0.9:
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: Unable to compile class for JSP:
    An error occurred at line: 3 in the jsp file: /savename.jsp
    The method getParamater(String) is undefined for the type HttpServletRequest
    1: <%
    2: String name = request.getParameter("username");
    3: String age = request.getParamater("age");
    4: session.setAttribute("theName", name);
    5: session.setAttribute("theAge", age);
    6: %>
    Stacktrace:
         org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:85)
         org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
         org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:415)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:308)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:308)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)I do not understand the error, as it works fine when I simply try to retrieve "theName", but breaks when I try to retrieve both.
    What is it I am missing here?
    Thanks,
    Dan

    Ummm.... you misspelled "parameter" the second time
    you tried to use it.......
    That is incredibly embarrassing. Sorry if I made anyone think it was something more serious. Holy mackerel, I think it's time for me to read over my code much more carefully before posting about a problem.
    Thanks for the help DrClap.

  • Acquiring HTML Text From HTML Page

    Just wanting to make a simple html editor. I read the documentation, and yes I know that not all pages form to the specifiecations, but I just want to know how to get all that yummie HTML into text rather than serving up a webpage. I am using the JEditorPane, and I think this answer may lay in the javax.swing.text.*; packages.

    Just trying to make a code editor by allowing the loading of an html page as a text file. Assuming you have the HTML source and now you wish to get the plain text from the HTML source,the following piece of code can help you:
    private String getPlainText(String htmlText)
    String str=null;
    JTextPane text=new JTextPane();
    text.setContentType("text/html");
    text.setText(htmlText);
    try{
      str=text.getDocument().getText(0,text.getDocument().getLength());
    }catch(BadLocationException){e.printStackTrace();}
    return str;
    }

Maybe you are looking for

  • How to directly call business object class from backing bean class

    I woul like to call business object class directly from the backing bean class and implement methods in BO. If possible can anyone give an example code. Thanks in advance

  • About this Mac, Storage, "Other".

    What is put in this 'Other' category?  My Other category shows that it has 101.33GB in it...I'd like to try and clean this out so I have more disk space.  Thanks, Lin

  • Checkboxes checked and pagination

    Hi, I have a paginated datagrid done with a report , displaying on each page : - a checkbox in the header to select all - on checkbox on each row My problem is just that i would like to keep (in session) the checked rows (for each page) : then naviga

  • Make a logo overlap menu bar

    I have a logo picture file that has a transparent background.  Below that I have a spry menu bar and then the main box with content.  The logo is my name in script.  I want the J of my logo to drop down below the top line of the menu bar, just like i

  • I can't see the serial number on my Acoount

    Adobe Photoshop I can't see the serial number on my Acoount