email - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

email

Last post 08-05-2005 09:32 AM by Patrick Halstead. 10 replies.
Page 1 of 1 (11 items)
Sort Posts: Previous Next
  • 07-28-2005 08:58 AM

    email

    i want to configure a submit phone on the form to send email i know how to do that but my question is i dont wanna pre define the email address in the to box i want it to be blank but after i preview the form and fill it and click on submit i want out look to open up with the form attached and its there i wanna give which ever email i want to. i hope u understand wat i mean .. i need a faster reply for this ..
    thanks
    sunil
  • 07-28-2005 09:45 AM In reply to

    Hi Sunil,
    Since you have a copy of the AD Web service, just call GetUserInfo. Shanthi will reply with more details.

    Patrick Halstead [InfoPath MVP]
    InfoPathDev
    Patrick Halstead
    Project Manager at Qdabra
  • 07-28-2005 10:54 AM In reply to

    Hi Sunil,
    The Email dialog that comes up belongs to Outlook and I dont think we can edit data once it gets entered into it.(Probably we can with a lot of code and which is not worth it)

    But you can set the email id in the submit button code.
    Here is the code with which you can set an email id.

    //Get the email adapter
    EmailAdapter oEmail = (EmailAdapter)thisXDocument.DataAdapters["Email"];

    //Set the to address
    oEmail.To = "abc#xyz.com";
    //In the above statement you can get the emailId from any one of the field that is in your form/Dataconnections.

    //Submit the email
    oEmail.Submit();

    To set an email address you can use a text box in the UI and use that fields value in the code to set the to email address.

    Hope this helps!

    Agni
    InfoPath Dev India
  • 07-28-2005 12:26 PM In reply to

    hey agni u r just not getting my question here is wat i want
    when configuring the submit command window, i want the submit command to submit an emil but i want the user to be able to enter the emai address himself and the submit action parameters currently request and email address where this form would be mailes. how can i change the action to enable a blank To field on the email?

    thanks,
    sunil
  • 07-28-2005 01:00 PM In reply to

    Where do you want to enter the email, Is it in the email dialog that appears when you click on submit?
    If this is correct you cannot type on this dialog, because this dialog belongs Outlook which is out of InfoPath.


    Agni
    InfoPath Dev India
  • 07-28-2005 01:11 PM In reply to

    ok let me make it more simpler ..i guess u have infopath 2003 on the computer ur using now.. ok when u open infopath from start button program and infopath.. infopath opens up and when it does u get fill out forms in the please choose issue tracking (detailed) when u open this form it opens up and in the form u have send as email button when u click on it it opens in out look as an attchement .. this is how i want it in my form .. i hope u can help me on this atleast thansk agni..

    sunil
  • 07-28-2005 03:24 PM In reply to

    Hi Sunil,
    Ok you have explained me clearly this time, thanks for that.
    Script file of that form has all of the you need, to open an outlook window with attachment.
    Just double click on the button and click on "Edit Form code" in the button dialog, you have all the written there.

    Once you open the code create method is the one that you need to look at.

    These are the 4 lines that you need

    var oEnvelope = XDocument.View.Window.MailEnvelope;
    oEnvelope.To = rgRecipients.join("; ");
    oEnvelope.Subject = getNodeValue(xmlTitle);
    oEnvelope.Visible = true;

    Agni
    InfoPath Dev India
  • 08-01-2005 08:42 AM In reply to

    hey agni thanks for the reply i hope u got my question yeah it was good to know i could make u understand the question .. agni instead of putting the cord is there a way to make it in the form .. like r they any buttons or anything which does that i hope u understand what i mean .. or if no .. could u plz tell me where to put the code thanking u

    sunil
  • 08-04-2005 07:35 AM In reply to

    Hi Sunil,
    Sorry for being late,
    You need to put this above code in onclick event of a button.
    For ex:-

    function CTRL1_5::OnClick(eventObj)
    {
    var oEnvelope = XDocument.View.Window.MailEnvelope;
    oEnvelope.To = rgRecipients.join("; ");
    oEnvelope.Subject = getNodeValue(xmlTitle);
    oEnvelope.Visible = true;
    }

    Hope this Helps!

    Agni
    InfoPath Dev India
  • 08-05-2005 06:55 AM In reply to

    thanks agni u have been very helpful.. i have a similar question to one person who has asked it but a diff kind of a form ... the question is ...i have a form having 4 sections and in the section i have a drop down box and send email button ..the drop down box has approve and reject option.. what i want to do is when i select approve in drop down box i have to send it to one email if its reject it has to be sent to diff email.. is there a way to do it ..its similar to it .. can u help me on this .. thanks..
  • 08-05-2005 09:32 AM In reply to

    Hi Sunil,
    You can use a Rule that triggers for each value and sets toe To recipient. Or, you can have an OnAfterChange event handler that sets the To recipient based on the value in the dropdown. I hope these hints help.

    Patrick Halstead [InfoPath MVP]
    InfoPathDev
    Patrick Halstead
    Project Manager at Qdabra
Page 1 of 1 (11 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.