API Connections - VisualCron - Forum

Community forum

Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
View
Go to last post Go to first unread
Offline Fola  
#1 Posted : Thursday, June 8, 2017 12:10:42 PM(UTC)
Fola

Rank: Paid support

Joined: 6/2/2017(UTC)
Posts: 16
United Kingdom
Location: England, London

I'm trying to add new connections on the fly using the API.

Here's a snippet of the code:

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

Edited by moderator Friday, June 9, 2017 10:35:03 AM(UTC)  | Reason: Not specified

Offline Support  
#2 Posted : Friday, June 9, 2017 10:34:50 AM(UTC)
Support

Rank: Official support

Joined: 2/23/2008(UTC)
Posts: 11,256

Thanks: 877 times
Was thanked: 450 time(s) in 427 post(s)
There was no log attached.

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

Code:
server.Encrypt("smtp.connection.com");
Henrik
Support
http://www.visualcron.com
Please like VisualCron on facebook!
Users browsing this topic
Guest
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Scroll to Top