API Connections - VisualCron - Forum

Community forum

Fola
  •  Fola
  • Paid support Topic Starter
2017-06-08T10:10:42Z
I'm trying to add new connections on the fly using the API.

Here's a snippet of the code:

server.Connections.Add(new ConnectionClass
                {
                    CodePage = 1252
                    ProtocolType = ConnectionClass.ProtocolT.SMTP,
                    Name = "Custom Email Connection",
                    AuthenticationType = ConnectionClass.AuthenticationT.Anonymous,
                    Host = Encoding.GetEncoding(1252).GetBytes("smtp.connection.com")
                });


As soon as this code is executed, my VisualCron client crashes if I try to list the available connections.
I have attached the error log from the crash to this topic
Support
2017-06-09T08:34:50Z
There was no log attached.

But Host is not just a byte array - it is an encrypted byte array. Use;

server.Encrypt("smtp.connection.com");

Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Scroll to Top