Skip navigation
Currently Being Moderated

Send email to me and user

Sep 24, 2012 12:30 PM

Ok simply I want 1 text field labeled "Your email address". I also want 1 button that says "Send mail".

 

I want the user to be able to send me the PDF form and also send the copy to his email previously seen in 1 text field.

 

I also dont want to use local mail clients. Just want to upload the PDF to my server so the user comes, inputs and fires of the mail from there.

 

Im using Livecycle ES2.

 

Please help.

 
Replies
  • Currently Being Moderated
    Sep 24, 2012 12:38 PM   in reply to darje6666

    1) Make the email address a mandatory field

    2) Put a submit button on the form that is pointing to your LiveCycle application on the server

    3) On the server do the process form submission

    4) The next step in the process would be to use the email service to send it to yourself

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 24, 2012 1:54 PM   in reply to darje6666

    DARJE6666:

     

    In order to bypass client-side e-mail software such as OUTLOOK, you will need to submit the PDF to a server-side script, such as PHP or ASP.net.

     

    If you do not know how to program, and you are using Microsoft web servers, then check out www.pdfemail.net

     

    PDFEmail.net generates ASP.net scripts and libraries you upload to your web server. It works with Acrobat and LiveCycle PDF forms.

     

    PDFEmail.net can parse the submission data, and pull the e-mail address from the PDF form field value, and populate the "TO:" address in the message.

     

    For an online demo:

    http://www.nk-inc.com/software/pdfemail.net/examples/

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 24, 2012 1:59 PM   in reply to darje6666

    Hi,

     

    I believe you use LiveCycle Designer ES2, right?!

    Then you can use a macro to create your mail script.

     

    All you need is here.

    http://thelivecycle.blogspot.de/2012/05/mailto-maker-marco-v1.html

     

    Once installed, you can use the macro to easily create mailTo scripts in a regular button that can populate values from any form field.

    mailto_maker.png

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 24, 2012 2:17 PM   in reply to darje6666

    OK,

     

    step-by-step.

     

    1. Create a button

    2. Goto the tools menu > scripts > LCB_MailToMaker.js

    3. The macro will launch a Flash dialog where you can edit your mail.

    On the right side you'll see a dropdown list, that contains all form fields that can be used as a reference prefixed with a variable number in curly brackets.

    4. Select the desired field name, than select the field you want to populate with the fields value and click the plus button.

    5. Add some subject and mail body

    6. Confirm with OK.

     

    The macro now adds a complete mailTo script to your button's click event.

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 24, 2012 2:20 PM   in reply to darje6666

    You need FlashPlayer to run the macro.

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 24, 2012 2:29 PM   in reply to darje6666

    If the macro doesn't run because of you don't have flash player installed use this script.

    It's the one the macro will create.

    You will only have to modify the somExpression of var0.

     

    var var0 = xfa.resolveNode("Form1.#subform.Textfield1").rawValue;
     
    event.target.mailDoc({ 
              bUI: false, 
              cTo: var0, 
              cCc: 'email4you@youraddress.org', 
              cBcc: '', 
              cSubject: 'Filled form', 
              cMsg: 'Here's my filled form.' 
    });
    
     
    |
    Mark as:
  • Currently Being Moderated
    Sep 25, 2012 12:46 AM   in reply to darje6666

    Hi,

     

    correct, that was my fault.

    The script fails because of an unescaped ' character in cMsg.

    Here's the corrected one.

     

    var var0 = xfa.resolveNode("Form1.#subform.Textfield1").rawValue;
      
    event.target.mailDoc({ 
              bUI: false, 
              cTo: var0, 
              cCc: 'email4you@youraddress.org', 
              cBcc: '', 
              cSubject: 'Filled form', 
              cMsg: 'Here\'s my filled form.' 
    });
    
     
    |
    Mark as:
  • Currently Being Moderated
    Sep 25, 2012 1:05 AM   in reply to radzmar

    I fixed that problem in the macro too.

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 25, 2012 1:37 AM   in reply to darje6666

    AppHangB1 is a Windows releated problem.

    Maybe you use a virus scanner or so that causes the problem.

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 25, 2012 7:05 AM   in reply to darje6666

    Ok,

     

    1. Create a button and select it

    2. Open the script editor (on top of the design view) (ctrl + shift + F5)

    3. Select the click event and make sure the language is set to "JavaScript".

    4. Paste the script above

     

    MailTo.png

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 25, 2012 9:09 AM   in reply to darje6666

    Yes,

     

    the problem is you didn't modify the SOM expression for your text field.

    If the form is build as the one in your video, than you have to change the line

     

    var var0 = xfa.resolveNode("Form1.#subform.Textfield1").rawValue;
    

     

    into

     

    var var0 = xfa.resolveNode("form1.#subform.TextField1").rawValue;
    

     

    Here's a good article that explains the basics of SOM expression.

    http://www.assuredynamics.com/index.php/2011/05/som-expressions/

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 25, 2012 9:36 AM   in reply to darje6666

    I don't see any relationship between the script and your mailing problem.

    The script simply copies the string you enter in the text field and uses it as cTo property.

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 25, 2012 1:29 PM   in reply to darje6666

    You can use a small JavaScript in the exit event of the text field which uses a regular expression to check the entered address.

     

    if (!this.rawValue.match(/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/g)) {
              xfa.host.messageBox("Invalid E-mail address!");
    }
    
     
    |
    Mark as:
  • Currently Being Moderated
    Sep 25, 2012 1:46 PM   in reply to darje6666

    No S's at all. I have really no idea where it comes from at your end.

    Maybe you mail app refers auto-poplulates the address with another one which is invalid.

    What if you use another address? Any additional S there?

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 25, 2012 1:56 PM   in reply to darje6666

    Try it on another system if possible.

    I believe this is related  to your current mail app.

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 25, 2012 2:19 PM   in reply to darje6666

    Yes, I use it in ES3, but it will also work with ES2.

    All you need is FlashPlayer.

     

    Here are some basic information about.

    http://blogs.adobe.com/formfeed/2010/01/designer_es2_macros.html

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points