Welcome Guest ( Login | Register )



All times are UTC - 7 hours [ DST ]



Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Email device parameters
PostPosted: Tue Aug 07, 2012 4:53 am 

Joined: Mon Sep 12, 2011 4:52 am
Posts: 29

Offline
Hi. I have written a code to modify the Email device parameters (SMTP, port, etc) via script, but all the settings are lost during the power cycle. Could you suggest me in which way it is possible to save the settings permanently?
Thank you!


 Profile  
 
 Post subject: Re: Email device parameters
PostPosted: Tue Aug 07, 2012 8:14 am 

Joined: Tue Mar 13, 2012 9:53 am
Posts: 824

Offline
The below code will save the updates to the xml file.

Code:
namespace Neo.ApplicationFramework.Generated
{
    using System.Windows.Forms;
    using System;
    using System.Drawing;
    using Neo.ApplicationFramework.Tools;
    using Neo.ApplicationFramework.Common.Graphics.Logic;
    using Neo.ApplicationFramework.Controls;
    using Neo.ApplicationFramework.Interfaces;
   
   using Neo.ApplicationFramework.Common.Service;
   using Neo.ApplicationFramework.Common;
   
    public partial class Screen1
    {
      
      void Button1_Click(System.Object sender, System.EventArgs e)
      {
         IDeviceManagerServiceCF deviceManagerService = ServiceContainerCF.GetServiceSafe<IDeviceManagerServiceCF>();
         IEmailDevice m_EmailDevice = deviceManagerService.GetOutputDevice<IEmailDevice>();
         m_EmailDevice.FromEmailAddress = "From Script@what.com";
         deviceManagerService.SaveDevices(m_EmailDevice as IOutputDevice);
      }
    }
}

_________________
Best Regards,
Mark Monroe

Beijer Electronics, Inc. | Applications Engineer


 Profile  
 
 Post subject: Re: Email device parameters
PostPosted: Fri Aug 10, 2012 1:20 am 

Joined: Mon Sep 12, 2011 4:52 am
Posts: 29

Offline
Thank you very much!


 Profile  
 
 Post subject: Re: Email device parameters
PostPosted: Mon Oct 20, 2014 2:56 am 

Joined: Mon Oct 20, 2014 1:34 am
Posts: 1

Offline
I have also written a code to modify the Email device parameters via script. But I cannot set m_EmailDevice.AuthMode (string, int, bool do not work). Can you show me how to do it?
Thank you in advance!


 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 7 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron