InfoPath code to send an automatic email on Submit - InfoPath Dev
in

InfoPath Dev

InfoPath code to send an automatic email on Submit

Last post 05-05-2010 09:50 AM by Qazi Anis. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 05-05-2010 08:22 AM

    • JFKsr
    • Not Ranked
    • Joined on 05-05-2010
    • Posts 1

    InfoPath code to send an automatic email on Submit

    Hello Everyone,

    I am trying to send an automatic email when user completes a form and hits 'Submit' button.

    The following is the code I am trying to use in 'script.js' file. And, I receive the following error.

    Any ideas on how to fix the issue? Thanks a million in advance!

    Error:

    The following error occurred:

    Expected ';'
    File:script.js
    Line:24
     MailMessage MailMsg = new MailMessage();

    Code: 

    function SubmitData::OnClick(eventObj)

    {

    MailMessage MailMsg = new MailMessage();

    MailMsg.Body = "Testing ";

    MailMsg.From = [email protected];

    MailMsg.To = [email protected];

    MailMsg.Subject = "InfoPath Test Message";

    SmtpMail.SmtpServer = "xxx.xxx.xx";

    SmtpMail.Send(MailMsg);

    }

     

  • 05-05-2010 09:50 AM In reply to

    Re: InfoPath code to send an automatic email on Submit

    var MailMsg = new MailMessage();

    Qazi Anis
    Technical Architect
    Bitwise Inc
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.