Form Email and Insert to DB

I'm trying to get a form both - email and insert into a database the form information.  Below, you can see the code I am using.
Here is my setup:
1. I have a form where the action is a file called formmail.php
2. This file inserts the data into a database and then includes another file called phpmail.php
3. phpmail.php first looks in a file called zipcodes.php where I've set a number of arrays for various possible zipcodes.
4. phpmail.php then emails the form data to the email addresses associated with those zipcodes.
Without the formmail.php step - it works perfectly.
With the formmail.php step - it inserts it into a database, checks if the email address is formatted correctly, but does not email anyone.
Do you know why?   Below is the code for the various files:
formail.php
<?php
$con = mysql_connect("localhost","user","password");
if (!$con)
die('Could not connect: ' . mysql_error());
mysql_select_db("phtsystem", $con);
$sql="INSERT INTO leads (firstname, lastname, address, city, `state`, zip, phone, email, comments, reason) VALUES ('$_POST[name2]','$_POST[last_name]','$_POST[address]','$_POST[city]','$_POST[state]','$_POST[zip]','$_POST[phone2]','$_POST[email]','$_POST[comments]','$_POST[reason]')";
if (!mysql_query($sql,$con))
die('Error: ' . mysql_error());
include "phpmail.php";
?>
phpmail.php
<?php
include("zipcodes.php");
$zip=$_POST["zip"];
          if (in_array($zip, $Nashville)) {
$my_email = "[email protected], [email protected], [email protected], [email protected]";
          }elseif (in_array($zip, $Knoxville)) {
$my_email = "[email protected], [email protected], [email protected], [email protected]";
          }elseif (in_array($zip, $Huntsville)) {
$my_email = "[email protected], [email protected], [email protected], [email protected]";
          }elseif (in_array($zip, $Florida)) {
$my_email = "[email protected], [email protected], [email protected], [email protected]";
          }elseif (in_array($zip, $Georgia)) {
$my_email = "[email protected], [email protected], [email protected], [email protected]";
          }elseif (in_array($zip, $SouthCarolina)) {
$my_email = "[email protected], [email protected], [email protected], [email protected]";
          }elseif (in_array($zip, $NorthCarolina)) {
$my_email = "[email protected], [email protected], [email protected], [email protected]";
          }elseif (in_array($zip, $Pennsylvania)) {
$my_email = "[email protected], [email protected], [email protected]";
          }elseif (in_array($zip, $Maryland)) {
$my_email = "[email protected], [email protected], [email protected], [email protected]";
           }elseif (in_array($zip, $Virginia)) {
$my_email = "[email protected], [email protected], [email protected], [email protected]";
           }elseif (in_array($zip, $Texas)) {
$my_email = "[email protected], [email protected], [email protected]";
} else { $my_email = "[email protected], [email protected], [email protected]";
$continue = "/";
$errors = array();
if(count($_COOKIE)){foreach(array_keys($_COOKIE) as $value){unset($_REQUEST[$value]);}}
function recursive_array_check_header($element_value)
global $set;
if(!is_array($element_value)){if(preg_match("/(%0A|%0D|\n+|\r+)(content-type:|to:|cc:|bcc:)/i",$element_value)){$set = 1;}}
else
foreach($element_value as $value){if($set){break;} recursive_array_check_header($value);}
recursive_array_check_header($_REQUEST);
if($set){$errors[] = "You cannot send an email header";}
unset($set);
if(isset($_REQUEST['email']) && !empty($_REQUEST['email']))
if(preg_match("/(%0A|%0D|\n+|\r+|:)/i",$_REQUEST['email'])){$errors[] = "Email address may not contain a new line or a colon";}
$_REQUEST['email'] = trim($_REQUEST['email']);
if(substr_count($_REQUEST['email'],"@") != 1 || stristr($_REQUEST['email']," ")){$errors[] = "Email address is invalid";}else{$exploded_email = explode("@",$_REQUEST['email']);if(empty($exploded_email[0]) || strlen($exploded_email[0]) > 64 || empty($exploded_email[1])){$errors[] = "Email address is invalid";}else{if(substr_count($exploded_email[1],".") == 0){$errors[] = "Email address is invalid";}else{$exploded_domain = explode(".",$exploded_email[1]);if(in_array("",$exploded_domain)){$errors[] = "Email address is invalid";}else{foreach($exploded_domain as $value){if(strlen($value) > 63 || !preg_match('/^[a-z0-9-]+$/i',$value)){$errors[] = "Email address is invalid"; break;}}}}}}
if(!(isset($_SERVER['HTTP_REFERER']) && !empty($_SERVER['HTTP_REFERER']) && stristr($_SERVER['HTTP_REFERER'],$_SERVER['HTTP_HOST']))){$errors[] = "You must enable referrer logging to use the form";}
function recursive_array_check_blank($element_value)
global $set;
if(!is_array($element_value)){if(!empty($element_value)){$set = 1;}}
else
foreach($element_value as $value){if($set){break;} recursive_array_check_blank($value);}
recursive_array_check_blank($_REQUEST);
if(!$set){$errors[] = "You cannot send a blank form";}
unset($set);
if(count($errors)){foreach($errors as $value){print "$value<br>";} exit;}
if(!defined("PHP_EOL")){define("PHP_EOL", strtoupper(substr(PHP_OS,0,3) == "WIN") ? "\r\n" : "\n");}
function build_message($request_input){if(!isset($message_output)){$message_output ="";}if(!is_array($request_input)){$message_output = $request_input;}else{foreach($request_input as $key => $value){if(!empty($value)){if(!is_numeric($key)){$message_output .= str_replace("_"," ",ucfirst($key)).": ".build_message($value).PHP_EOL.PHP_EOL;}else{$message_output .= build_message($value).", ";}}}}return rtrim($message_output,", ");}
$message = build_message($_REQUEST) . "This email is from the website.  If it doesn't say specifically what the person is contacting us about, it is most likely a sales lead.";
$message = $message . PHP_EOL.PHP_EOL."-- ".PHP_EOL."";
$message = stripslashes($message);
$subject = "New Lead from PHT.com";
$headers = "From: " . $_REQUEST['email'];
mail($my_email,$subject,$message,$headers);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Dreamweaver Tutorial - Contact Form</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript">
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-28969997-1']);
  _gaq.push(['_trackPageview']);
  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
</script>
</head>
<body bgcolor="#ffffff" text="#000000">
<div>
<center>
<b>Thank you <?php print stripslashes($_REQUEST['name']); ?></b>
<br>Your message has been sent
<p><a href="<?php print $continue; ?>">Click here to continue</a></p>
</center>
</div>
</body>
</html>
zipcodes.php
<?php
$Nashville = array (37010, 37027, 37040, 37055, 37067, 37075, 37088, 37121, 37133, 37152, 37179, 37201, 37209, 37217, 37228, 37238, 37246, 37015, 37034, 37048, 37063, 37071, 37082, 37115, 37129, 37141, 37167, 37186, 37205, 37213, 37221, 37234, 37242, 37250, 38487, 37011, 37029, 37041, 37056, 37068, 37076, 37089, 37122, 37135, 37153, 37180, 37202, 37210, 37218, 37229, 37239, 37247, 37022, 37035, 37049, 37064, 37072, 37085, 37116, 37130, 37143, 37171, 37187, 37206, 37214, 37222, 37235, 37243, 38401, 37013, 37031, 37043, 37060, 37069, 37077, 37090, 37127, 37136, 37155, 37181, 37203, 37211, 37219, 37230, 37240, 37248, 37024, 37036, 37051, 37065, 37073, 37086, 37118, 37131, 37146, 37172, 37188, 37207, 37215, 37224, 37236, 37244, 38476, 37014, 37032, 37046, 37062, 37070, 37080, 37098, 37128, 37138, 37165, 37184, 37204, 37212, 37220, 37232, 37241, 37249, 37025, 37037, 37052, 37066, 37074, 37087, 37119, 37132, 37148, 37174, 37189, 37208, 37216, 37227, 37237, 37245, 38482);
?>
<?php
$Knoxville=array(37354, 37709, 37717, 37726, 37737, 37755, 37763, 37770, 37777, 37803, 37819, 37830, 37842, 37849, 37865, 37874, 37886, 37901, 37914, 37918, 37922, 37928, 37932, 37940, 37996, 38504, 37381, 37710, 37719, 37729, 37742, 37756, 37764, 37771, 37779, 37804, 37826, 37831, 37845, 37852, 37866, 37878, 37887, 37902, 37915, 37919, 37923, 37929, 37933, 37950, 37997, 38557, 37701, 37714, 37721, 37732, 37748, 37757, 37766, 37772, 37801, 37806, 37828, 37840, 37846, 37853, 37871, 37882, 37892, 37909, 37916, 37920, 37924, 37930, 37938, 37990, 37998, 38558, 37705, 37716, 37723, 37733, 37754, 37762, 37769, 37774, 37802, 37807, 37829, 37841, 37847, 37854, 37872, 37885, 37893, 37912, 37917, 37921, 37927, 37931, 37939, 37995, 37999);
?>
etc...
Message was edited by: Drymetal

Scratch that.  It does work perfectly.   It just took the stupid server 20 minutes to send the emails. 

Similar Messages

  • How add new HTML5 input tags to Insert,Form menu and Insert,Tag,HTML?

    how do I add new HTML5 input tags to the Insert,Form menu and Insert,Tag,HTML tags menus of dw cs5?
    I remember seeing some documentation about the latter, but it wasn't very good.  can't figure out how to actually implement something, so need a mentor - and I am a software developer. :-/
    http://help.adobe.com/en_US/dreamweaver/cs/extend/WS5b3ccc516d4fbf351e63e3d117f53d77c2-800 0.html
    but I am not sure what this applies to.  manual is not clear on this.

    I am removing it from my WATCHES since I find out what was wrong. In the submit.jsp, current needs to be setup instead of create.
    <jbo:Row id="myrow" datasource="ds" action="current" >
    Have a great week.
    Kamran

  • Adobe forms - Email and fax

    Hi,
    Does anyone have any idea about how a adobe form(tcode-SFP) can be sent through email and fax?
    I have created an interest form and have to send it accross to the customer maintained in the customer master when i run transaction code FINT.
    Help will be highly appreciated.
    Regards,
    Rasika
    Moderator Message: There is a seperate forum for Adobe Interactive Forms. Please post your question there.
    Edited by: kishan P on Nov 2, 2010 11:26 AM

    Hi,
    Thanks for reply
    The link u mentioned utilises Objects.. but can we send internet mail using this?
    As we cannot change RECIPIENT TYPE in this case in the object.
    I used this format in the program but the attachment is going to EXpress inbox. and goes to my SAP Inbox instead of Email .
    So what changes we need to do for this.
    Alternatively,  can we use FM 'SO_NEW_DOCUMENT_ATT_SEND_API1' for this purpose?
    Edited by: Rohit Pareek on Feb 3, 2009 3:36 PM

  • PHP Form Validation and Insert Records

    Hi There,
    I've been scratching my head for 2 days and couldn't find a solution.
    Here is my problem:
    Go to http://ecopethandbags.com/contactTest.php and click the "Send Comments" button.
    You will see that the validation works.
    Now, go to http://ecopethandbags.com/contactTestInsert.php, this time, I've inserted the "Insert Record" server behavior.
    Click the "Send Comments" button again.
    You will see the ugly message like "Column 'firstname' cannot be null" in a plain white page.
    My question is:
    How can I insert the PHP form records in my database and take advantage of the form validation nicely like in http://ecopethandbags.com/contactTest.php
    I am attaching the files.
    Thank you for you help!

    boloco wrote:
    My question is:
    How can I insert the PHP form records in my database and take advantage of the form validation nicely like in http://ecopethandbags.com/contactTest.php
    Use simple PHP logic to merge the scripts together.
    Dreamweaver automatically puts the Insert Record server behavior code at the top of the script. You need to adapt it so that the validation is done first. If the validation succeeds, use the Insert Record server behavior. If not, redisplay the form.
    if (array_key_exists('send', $_POST)) {
      // validate the form input
      if (!$suspect && empty($missing)) {
      // send the mail
        if ($mailSent) {
        unset($missing);
        // insert the Insert Record server behavior code here

  • Form emailer and xml

    I have a form set up and if a user inputs their first name I
    want the email sent to have their first name surrounded by XML. I
    have tried this but it doesn't work(the email gets sent with the
    xml stripped out):
    <cfoutput>
    <firstname> #form.firstName# </firstname>
    </cfoutput>

    First, you don't need the cfoutput tag, cfmail includes this.
    Second, are you sending the mail as text or html? If you are
    sending as html change the angle brackets to &lt; and
    &gt;.

  • How to select a item form listbox and insert it into combo

    i want to select a item from listbox and display it in combo ,how realize ?
    and how to insert a vi into a subpanel and excute?
    everyone's help will be appreciated 

    Hello,
    to add in Listbox selected item to Combobox see attached Vi. With the other part of our question must help someone other because I never did it.Message Edited by ceties on 10-18-2006 04:57 AM
    LV 2011, Win7
    Attachments:
    Insert.vi ‏20 KB

  • Setting up DW so a submitted form goes to email and PayPal??????

    I build and sell wood products on my website. I would like a visitor who is interested in haveing custom work done fill out a form with their choices of wood, finishes, sizes, etc. The idea is if they want the "base product", they can click on Paypal's "add to cart" (which adds the base price of the product to their cart)then if they want any accessories added for an additional charge, I have listed each accessory and put an "add to cart" button next to each one. So, for each accessory they want, an additional charge is added to their cart total. I do not have e-comerce in D.W. as I am just starting out.
    At this point I have set up a page and inserted a form. Inside the red dashed box, I have put form info such as name, address, etc. List boxes for choices of sizes, wood species, finishes, etc. I have gone into "Tag Inspector" and chose "onsubmit" to redirect to the home page in case a vsitor wants to continue shopping. Upon "submit", I would also like to receive an email with all the form information list.
    If you know of a better/easier way to do this...PLEASE TELL ME
    Here are my issues: (sorry, more than one)
    How do I configure the form to go to my email? I googled this question and found information to set up a "sendresults.php" file with a bunch of code but that didn't work and I haven't a clue why.
    I can't insert the "Add to Cart" button from PayPal into the form. It screws up the whole page.
    Thank you all for your help.
    Bill

    Ideally, your product options should be integrated into your shopping cart system where they are stored in a product database.
    https://merchant.paypal.com/cgi-bin/marketingweb?cmd=_render-content&content_ID=merchant/w p_standard
    PayPal alone is not robust enough to handle more than a couple of product options such as size and colors.
    Have you looked at any 3rd party shopping carts yet? 
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/
    http://twitter.com/altweb

  • How to receive parameters from a form and insert values in db using servlet

    Hi friends,
    My first question here.
    I'm trying to create a Servlet that takes input from a form and process it and insert it in database.tablename.
    My MAIN ISSUE IS WITH THE NUMBER OF COLUMNS THAT WOULD BE DYNAMIC AND THUS CANT RECEIVE THE PARAMETERS IN STATIC CODE.
    Here is the form code
    <%@page contentType="text/html" pageEncoding="UTF-8"%>
    <!DOCTYPE html>
    <form action="Test" method="post" />
    <table width="90%" border="1" cellspacing="1" cellpadding="1">
    <tr>
    <th scope="col">Student Name</th>
    <th scope="col">RollNo</th>
    <th scope="col">Java</th>
    <th scope="col">J2ee</th>
    </tr>
    <tr>
    <td><input type="text" name="studentname" /></td>
    <td><input type="text" name="rollno" /></td>
    <td><input type="text" name="java" /></td>
    <td><input type="text" name="j2ee" /></td>
    </tr>
    <tr>
    <td><input type="text" name="studentname" /></td>
    <td><input type="text" name="rollno" /></td>
    <td><input type="text" name="java" /></td>
    <td><input type="text" name="j2ee" /></td>
    </tr>
    <tr>
    <td><input type="text" name="studentname" /></td>
    <td><input type="text" name="rollno" /></td>
    <td><input type="text" name="java" /></td>
    <td><input type="text" name="j2ee" /></td>
    </tr>
    </table>
    <input type ="submit" value="insert values in the database now"/>
    </form>
    </html>
    And here is the Servlet
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.sql.*;
    import java.io.*;
    public class Test extends HttpServlet {
    public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();
    String title = "Module: Process Result Values from previous page";
    out.println("<html>\n" +
    "<head><title>" + title + "</title></head>\n" +
    "<body>");
              try
                   Class.forName("com.mysql.jdbc.Driver");
                   Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/","root", "root");
                   Statement s = con.createStatement();
    ResultSet res = s.executeQuery("SELECT * FROM dbname.tablename");
    ResultSetMetaData rmeta=res.getMetaData();
    int noofcolumns=rmeta.getColumnCount();
                   if(!con.isClosed())
              catch(Exception e)
    System.out.println("Exception"+e);
    out.println(e);
    if(connectionFlag==1)
    out.println("</body></html>");
    doGet(request, response);
    public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
    This is the basic code structure and I'm trying to figure out this special case with handling the multiple parameters:
    1. I dont' want to use String []a=request.getParameterValues("studentname"); as hard code. The reason being the number of rows will be diyamic and I would like to get the column name and then then use an array of string to take values. But how can I connect these to form a query so that the rows goes on inserted one after other.
    Thanks,
    Mashall

    Thank you for your help.
    I'm something close to it but this segment of code throws a NullPointerException Error. I counted number of rows and columns using the methods getColumnCount() and getColumnName(i).
    ResultSetMetaData md = res.getMetaData(); //Get meta data for the resultset
    int noofcolumns=md.getColumnCount();
    out.println("<br />Number of columns in table (including name and roll number) :::: "+noofcolumns+"<br />");
    for(int i=1;i<=noofcolumns;i++) // access column 1....n
    String columnname = md.getColumnName(i); // get name of column 1....n
    out.println("<br />Current column name ::: "+columnname+"<br />"); //check if the name appear correct.
    String []columndata = request.getParameterValues(columnname); //Get raw value in array
    for(int j=1;j<=rows;j++) // here rows is number of rows in each column
    out.println("To be inserted: <b>"+columndata[j]+"</b> in Row ::: "+j+"<br />");
    //The line above thows null pointer exception.
    }

  • I have a MacBook pro 10.6.8, 2.66 Ghz 8GB 1067MHz. Please does anybody know of software that can auto send emails to a word/pages doc. and insert in date order into a book file, so that you can open like a book

    I have a MacBook Pro 10.6.8, 2.66 Ghz,  8GB memory 1067Mhz running Snow Lepard. I am going mad with trying to organise emails and cross reference to file documents, also the first model iPad.
    Does anybod know if there is any softeware - pages or otherwise that can copy emails automatically to document files and insert them in dated order and also that the file can be reviewed like a book by flicking from bottom right hand corner iPad book style.
    Please help me run my contracts easily, it shouldn't be difficult in this day and age.
    I currently use Apple 'Mail' and microsoft word but am considering any new software that can organise and integrate mail better. I use photo inserts and scanned documents and excel spreadsheets.

    No, I don't know about that kind of software. It isn't Pages anyway. You need somekind of database.

  • Email and fax a form

    Hi ,
           how can we send a form output as email and fax ? How to do the config for this? Can you explain the process to be done?
    Rama.

    Hi,
    See following code :
    REPORT zmail_att NO STANDARD PAGE HEADING LINE-SIZE 200.
    DATA : BEGIN OF ITAB OCCURS 0,
    PERNR LIKE PA0001-PERNR,
    ENAME LIKE PA0001-ENAME,
    END OF ITAB.
    DATA: message_content LIKE soli OCCURS 10 WITH HEADER LINE,
    receiver_list LIKE soos1 OCCURS 5 WITH HEADER LINE,
    packing_list LIKE soxpl OCCURS 2 WITH HEADER LINE,
    listobject LIKE abaplist OCCURS 10,
    compressed_attachment LIKE soli OCCURS 100 WITH HEADER LINE,
    w_object_hd_change LIKE sood1,
    compressed_size LIKE sy-index.
    START-OF-SELECTION.
    SELECT PERNR ENAME
    INTO CORRESPONDING FIELDS OF TABLE ITAB
    FROM PA0001
    WHERE PERNR < 50.
    LOOP AT ITAB.
    WRITE :/02 SY-VLINE , ITAB-PERNR, 15 SY-VLINE , ITAB-ENAME, 50
    SY-VLINE.
    ENDLOOP.
    Receivers
    receiver_list-recextnam = 'XXXXX@X...'. --> EMAIL ADDRESS
    RECEIVER_list-RECESC = 'E'. "<-
    RECEIVER_list-SNDART = 'INT'."<-
    RECEIVER_list-SNDPRI = '1'."<-
    APPEND receiver_list.
    General data
    w_object_hd_change-objla = sy-langu.
    w_object_hd_change-objnam = 'Object name'.
    w_object_hd_change-objsns = 'P'.
    Mail subject
    w_object_hd_change-objdes = 'Message subject'.
    Mail body
    APPEND 'Message content' TO message_content.
    Attachment
    CALL FUNCTION 'SAVE_LIST'
    EXPORTING
    list_index = '0'
    TABLES
    listobject = listobject.
    CALL FUNCTION 'TABLE_COMPRESS'
    IMPORTING
    compressed_size = compressed_size
    TABLES
    in = listobject
    out = compressed_attachment.
    DESCRIBE TABLE compressed_attachment.
    CLEAR packing_list.
    packing_list-transf_bin = 'X'.
    packing_list-head_start = 0.
    packing_list-head_num = 0.
    packing_list-body_start = 1.
    packing_list-body_num = sy-tfill.
    packing_list-objtp = 'ALI'.
    packing_list-objnam = 'Object name'.
    packing_list-objdes = 'Attachment description'.
    packing_list-objlen = compressed_size.
    APPEND packing_list.
    CALL FUNCTION 'SO_OBJECT_SEND'
    EXPORTING
    object_hd_change = w_object_hd_change
    object_type = 'RAW'
    owner = sy-uname
    TABLES
    objcont = message_content
    receivers = receiver_list
    packing_list = packing_list
    att_cont = compressed_attachment.
    Reward points if helpful.
    Regards.
    Srikanta Gope

  • How do I select and email a whole lot of photos on my iPad from my iPad emails? It seems I have to go into Email and then insert one photo at a time? Isn't there a way to select all in the photos and then email the batch.?

    How do I select and email a whole lot of photos on my iPad from my iPad emails? It seems I have to go into Email and then insert one photo at a time? Isn't there a way to select all in the photos and then email the batch.?

    Actually, you can email up to 5 at a time from the Photos app. Select any more and the email share option will not appear.
    If you explain why you need to email large numbers of photos, we might be able to offer an alternative.

  • How to extract data from a dummy email address and insert them into APEX db

    Hi All,
    I am developing a project management system on APEX 4.1.0.00.21.
    A very important function for the system will be - one sends an email in certain format to a dummy email address, then some data will be extracted from the email based on the pre-defined format and inserted into the database my APEX application is using.
    Any idea on how I can make it happen please?
    Thanks,
    Christine

    A very important function for the system will be - one sends an email in certain format to a dummy email address, then some data will be extracted from the email based on the pre-defined format and inserted into the database my APEX application is using.
    Any idea on how I can make it happen please? I agree that this is not really an Apex question, but a more general PL/SQL question.
    There are many approaches, all boiling down to one of these two:
    1) Push: Some process in the mail server sends/forwards information to your database when new mail arrives.
    The language/tools used to do this, and the way it would connect to your database, depends on your environment (what is your operating system? mail server? existing middleware/tools? security protocols used? etc.).
    2) Pull: Some process in the database contacts the mail server and polls for new information.
    Ie. some PL/SQL code would communicate with the mail server. Again, it depends on your environment (what is your operating system? mail server? existing middleware/tools? security protocols used? etc.).
    For example, if you are using Exchange 2007 or newer, it has a web services API:
    http://msdn.microsoft.com/en-us/library/dd877045.aspx
    The challenge here will be to build the correct SOAP requests from PL/SQL, and to handle the security protocols used.
    - Morten
    http://ora-00001.blogspot.com

  • How can I use Automator to extract information from the body of an email sent from a web form.. and the import it into Highrise?

    I'm assuming that Automator is the way to go. I've never used it before but from research it seems to be the way to go. Also, I'm not good at programming at all.
    Here's a typical email...
    From:      [email protected]
         Subject:      Enquiry for Property ID: 408777039, 2 Grey Avenue, Manningham, SA 5086, Listing Agent
         Date:      18 September 2013 8:33:51 PM ACST
         To:      Joe Jope
         Reply-To:   [email protected]
    You have received a new lead from realestate.com.au for
    Property id: 408587036
    Property address: 2 Grey Avenue, Manningham, SA 5086
    Property URL: www.realestate.com.au/404387039
    User Details:
    Name: John Bon Jovi
    Email: [email protected]
    Phone: 0422645633
    I would like to: buy this house
    Comments: Please give me a call.
    I have several hundred of these emails and I want to extract the information and then save it into my CRM which is Highrise (https://highrisehq.com). If it's too difficult to get it directly into Highrise then I'm aslo happy to extract the info into excel and the import into Highrise. However I do not want to have to run through that proceedure for every single email.
    I'd really like some help on how to get Automator to do this for me. Or if not Automator.. any other suggestions?
    Thanks.
    John

    Hello
    You may try the following AppleScript script. It will ask you to choose a root folder where to start searching for *.map files and then create a CSV file named "out.csv" on desktop which you may import to Excel.
    set f to (choose folder with prompt "Choose the root folder to start searching")'s POSIX path
    if f ends with "/" then set f to f's text 1 thru -2
    do shell script "/usr/bin/perl -CSDA -w <<'EOF' - " & f's quoted form & " > ~/Desktop/out.csv
    use strict;
    use open IN => ':crlf';
    chdir $ARGV[0] or die qq($!);
    local $/ = qq(\\0);
    my @ff = map {chomp; $_} qx(find . -type f -iname '*.map' -print0);
    local $/ = qq(\\n);
    #     CSV spec
    #     - record separator is CRLF
    #     - field separator is comma
    #     - every field is quoted
    #     - text encoding is UTF-8
    local $\\ = qq(\\015\\012);    # CRLF
    local $, = qq(,);            # COMMA
    # print column header row
    my @dd = ('column 1', 'column 2', 'column 3', 'column 4', 'column 5', 'column 6');
    print map { s/\"/\"\"/og; qq(\").$_.qq(\"); } @dd;
    # print data row per each file
    while (@ff) {
        my $f = shift @ff;    # file path
        if ( ! open(IN, '<', $f) ) {
            warn qq(Failed to open $f: $!);
            next;
        $f =~ s%^.*/%%og;    # file name
        @dd = ('', $f, '', '', '', '');
        while (<IN>) {
            chomp;
            $dd[0] = \"$2/$1/$3\" if m%Link Time\\s+=\\s+([0-9]{2})/([0-9]{2})/([0-9]{4})%o;
            ($dd[2] = $1) =~ s/ //g if m/([0-9 ]+)\\s+bytes of CODE\\s/o;
            ($dd[3] = $1) =~ s/ //g if m/([0-9 ]+)\\s+bytes of DATA\\s/o;
            ($dd[4] = $1) =~ s/ //g if m/([0-9 ]+)\\s+bytes of XDATA\\s/o;
            ($dd[5] = $1) =~ s/ //g if m/([0-9 ]+)\\s+bytes of FARCODE\\s/o;
            last unless grep { /^$/ } @dd;
        close IN;
        print map { s/\"/\"\"/og; qq(\").$_.qq(\"); } @dd;
    EOF
    Hope this may help,
    H

  • Acrobat 7 Pro - form won't submit via email, and data won't submit either

    Hi. I am trying to create a form for end users at my website to be able to open the form in Reader, enter their data in the form, and click on the "Submit" button to email it back to me (or any other way it can come back would be okay... as long as I can get the data).
    In doing some research on program software needed to do this, I came to the conclusion I needed to have the Adobe suite (Acrobat Pro 7, Distiller 7, and Designer 7), and so I spent a lot of money obtaining this software. I also have just downloaded Reader 9.0 (the most recent).
    Here are some particulars:
    1. Following directions Ive found on Adobe online, and the Help files as well as in this forum, in the form (in Designer), I have the Submit button going to a URL of mailto:[email protected].
    2. I've saved the form as a Static PDF Form File in Designer. Things are going well.
    3. The form works great in PDF Preview all form fields are setup and act correctly. Super!
    4. I FTP my file to the appropriate website, where once the link to the form is clicked the form opens (in Reader) for my users. Perfect!
    5. The user then opens the form, and before they start to fill it out, a popup shows this:
    Sending Data Fields By Email. Please note: This form contains an email submit button. Clicking this button will email a data file containing data you type into this form. However, the form itself will not be sent. Remember, you cannot save a completed copy of this form with Adobe Reader 9
    Then you have the option to Dont show again and a button to Close.
    6. After clicking Close, the user is then able to fill in the fields. These fields are standard fields, nothing exceptional, nothing fancy, just text.
    7. At the end of the form is the Submit button. When a user clicks this, NOTHING happens. Even when you try to do the File/Send thing, the form will send, but none of the data. Im not so happy right now L
    8. In this forum, I now see directions to Reader Enable in Adobe Pro (I do have Adobe Pro). The directions say Advanced/Enable Reader (as in one of the above posts is stated, 'Advanced > Enable Usage Rights in Adobe Reader'). However, I do not have an Enable Usage Rights in Adobe Reader under my Advanced tab. So, continuing to read in other similar posts, I find others dont have this option either so, one question is, where is it??? ;-)
    9. Now I see what appears to be another piece of Adobe software that I need, that is LiveCycle? I think Im getting in over my head, as I dont understand
    I am new to all this, and am doing my best, but now Im totally confused. All I want to do is have my measly little form open up and have people fill it in and email it back to me so that I can take that data and work with it.
    I run (or am trying to run) a non-profit (i.e., Im paying 100% of the bill) website for local Humane Societies who can facilitate offering online Adoption Applications (this is the form Im trying to make happen). I got the form made, and its fillable its just not being able to be submitted online; and when it DID get submitted (first try or so), it came through with no data, and the .xml file data wouldnt populate.
    Bottom line question: Is this, what Im trying to do, feasible or not? Im just a simple soul trying to help out some animals. Im not a programmer, so if thats what it takes I guess Im gonna have to give up and forget it. I only wanted to help make things easer for folks to adopt a pet.
    Any help by anyone would be totally and gratefully appreciated. Thank you.
    keywords: empty form, form not submitting, can't email form, data not transferring, no data in form, can't submit form, can't submit data

    Hi, and thank you for the reply.
    I've already spent several hundred dollars on getting Adobe Acrobat software, and was hoping there was some work-around on this? What did people do before LiveCycle for instance when they needed to get data from submitted forms via email?
    Please don't misunderstand, but as in my example described above, what can a 3rd party do for me (to enable more 'robust rights') that I can't do myself? I'm trying to figure out if I have the software to do it, paid for the software that is "supposed" to do it, why then I need to pay more money to someone else to make the software do what it's supposed to? I sure don't want to have to pay someone to fix it each time I need to make a change in my form for instance...
    I'm confused I guess - I suppose the purpose of my asking on the forum here was to hopefully gain some know-how as how to go about doing this myself vs. paying someone else to do it for me. I want to learn, but just don't know where to start. Or, maybe the software I have just doesn't do what I believed it was capable of doing?
    Guidance and/or suggestions from all on this point would be very appreciated. Thank you.

  • Acrobat form field that allows Reader user to browse and insert a picture into a predefined area

    Is there a way to do insert a form field into an AcroForm that allow Reader users to browse and insert a picture into that form field?
    I know that LiveCycle can do this, but I need to do this using an AcroForm. Or maybe there's a third-party plug-in that can be used in an AcroForm to do this?

    Jay,
    The new version of Reader, which was announced today (see AcrobatUsers.com), will now allow you to use the field.buttonImportIcon method: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.737.html
    For a bit more information, see: http://forums.adobe.com/thread/743823
    Here's the minimum code that can be used in the Mouse Up event of a button that's configured with a layout that's something other than "Label only":
    // Mouse Up script for a button
    event.target.buttonImportIcon();
    Since this isn't backwards compatible with Reader, you'll probably want to add additional code to test what version is being used and alert the user if it's pre-11. You should also check the return value to see if anything went wrong. The hard part is getting everyone to upgrade, but this and a number of other features should make it worth it.

Maybe you are looking for

  • Error Installing SAP Netweaver ABAP Trial version on windows XP

    Dear all, I was trying to install SAP NEtweaver 7.01 ABP trial version with MaxDB. DB installed fine but it failed later. Below is the error I am getting in the log file. I don't know what went wrong. I don't see it installed thus I can not uninstall

  • How to convert iDVD theme to .mov file. for use in FCP?

    I would like to use the Baby Mobile iDVD theme as a clip in a movie to be created on FCP. I dropped my pics in the iDVD project with the Baby Mobile theme and put in a green background so I could later key out the background and replace it with a dif

  • Password Protected Locked Layer?

    As a photographer, we are very protective of our creations. I have an image that I took for a client, that needs some Photoshop clean-up work, that will probably take me 15~30 minutes to complete, and I plan on billing my client for my labor. However

  • How can i recover contacts without icloud

    how can i recover contacts if i didnt backup my phone with icloud?

  • Time Machine ignores my exclude list

    I recently changed my exclude list to include a bunch of directories and remove some others. Problem is, Time Machine is blithely ignoring my new settings... still backs up the old directories that are in my current exclude list and, more importantly