automatically send email notification - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

automatically send email notification

Last post 09-21-2005 10:40 AM by cafearizona. 19 replies.
Page 1 of 2 (20 items) 1 2 Next >
Sort Posts: Previous Next
  • 08-04-2005 05:28 AM

    • hade79
    • Not Ranked
    • Joined on 08-04-2005
    • Germany
    • Posts 2

    automatically send email notification

    hi,

    i want a form, after it has been filled out by a user, to automatically send an email notfication to the responsible person, who has to evaluate the form.
    Does anyone know if this is possible and how to realize?

    thank you,
    hade
  • 08-04-2005 06:29 AM In reply to

    Re: automatically send email notification

    Hi Hade,
    Welcome to the forum!
    To send form as an email you need to add a Email submit dataconnection.
    To add an email dataconnection go to
    Tools->dataconnection->SubmitData->An E-Mail Message
    In the attachment type "Form", then your entire form will be sent as an email.

    There are lot of posts which speak about email dataconnection, please go through them.

    Hope this helps!


    Agni
    InfoPath Dev India
  • 08-04-2005 07:06 AM In reply to

    • hade79
    • Not Ranked
    • Joined on 08-04-2005
    • Germany
    • Posts 2

    Re: automatically send email notification

    Thank you Agni!

    But i didn't mean to send the whole form to an adress, but only a notification. Something like "s filled form of XY.xsn has been filled out. You can find it under X:\shared\formsXY\".

    hade
  • 08-04-2005 08:09 AM In reply to

    Re: automatically send email notification

    After you create the connection, write the following code in your onclick event

    EmailAdapter oEmail = (EmailAdapter)thisXDocument.DataAdapters["EmailConnectionName"];
    oEmail.To = sToAddress;
    oEmail.CC = sCCAddress;
    oEmail.Subject ="Subject, WHat ever you want";
    oEmail.Intro = "s filled form of XY.xsn has been filled out. You can find it under X:\shared\formsXY\" + link;

    oEmail.Submit();

    Hope this Helps!

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

    Re: automatically send email notification

    Hey Agni, is the code that you posted in Jscript?
  • 08-05-2005 07:06 AM In reply to

    Re: automatically send email notification

    Yes it is the same code in c#

    Agni
    InfoPath Dev India
  • 08-05-2005 01:23 PM In reply to

    Re: automatically send email notification

    When I use your code, I get the following error:

    InfoPath cannot open the selected form because of an error in the form's code.
    The following error occurred:

    Expected ';'
    File:script.js
    Line:24
    EmailAdapter oEmail = (EmailAdapter)thisXDocument.DataAdapters["Submit"];
  • 08-05-2005 01:40 PM In reply to

    Re: automatically send email notification

    Hey wcotech, this code is for c# and you are using it in the script.

    It has to be
    var oEmail = XDocument.DataAdapters("Submit");

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

    Re: automatically send email notification

    Thanks Agni, two more questions for ya...

    1. How do I set the "To" and "Cc" fields to be bound to datafields?
    2. When I enter "Xdocument.DOM.xml", I get an error that says "Xdocument is undefined". Any ideas?
  • 08-08-2005 08:43 AM In reply to

    Re: automatically send email notification

    Hi, wcotech,
    1. Here is the total code for email
    var oEmail = XDocument.DataAdapters("Email Submit");
    oEmail.To = abc@xyz.com;
    oEmail.CC = xyz@abc.com;
    oEmail.Subject = "Subject";
    oEmail.Intro = "Email body";
    oEmail.Submit();

    2. Here you have typo mistake "XDocument.DOM.xml".
    In XDocument 'd' is written in lower case.

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

    Re: automatically send email notification

    If I enter
    oEmail.To=abc@xyz.com;
    won't that send the email to "abc@xyz.com"? What I'm trying to do is have the oEmail.To=A Bound Field, that way whatever email address is in the datafield at the time of submitting gets the email sent to them. I hope that makes sense.
  • 08-08-2005 12:26 PM In reply to

    Re: automatically send email notification

    If you want to bind "To" address to a bound field then you need to set this setting by modifying your connection. In the Email dataconnection wizard you can bind your "to" address to a field in your form.

    Otherwise you can get the emailaddress from the field and set that value to it, for ex:-
    oEmail.To = XDocument.DOM.selectSingleNode("xpath");

    Agni
    InfoPath Dev India
  • 08-24-2005 09:04 AM In reply to

    Re: automatically send email notification

    Agni,

    One more question, is there a way to place datasets in the body of the email?
  • 09-01-2005 06:26 AM In reply to

    Re: automatically send email notification

    Anyone???
  • 09-01-2005 01:51 PM In reply to

    Re: automatically send email notification

    Hi WCOTech,
    Sorry for the delay. It's just code ... so there must be a way.... but I don't have a sample handy and unfortunately, we don't have time to write code for every request. It would be cool if someone got this working although I'm not sure of the scenario. Why not just attach it to your main dom and send the InfoPath form as an attachment?

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