FYI AES 256 Encryption and Password Protect files for distribution via email

dhirendra

Member
Joined
Jan 26, 2011
Messages
9
Programming Experience
1-3
Hi all,
i have created a VB.net application which can be used as a BO scheduler substitute for sending refreshed report copies. These copies are AES 256 encrypted and password protected. Please refer attached document for description, setup and source code
:cool:
Thanks
 

Attachments

  • Installation.zip
    112.8 KB · Views: 69
Last edited by a moderator:
FYI attachment contains an application that reads a distribution list in Excel by automation, compresses the attachment files to a password encrypted zip using DotNetZip Library, and sends mail using System.Net.Mail. A fixed drop folder is used for automatic distribution by Timer.

Also a FYI to OP, this is not a distribution channel for applications, compiled binaries is not allowed so I deleted the link to the setup file. If you want to discuss part or whole of the code or design of the application you should explain that.

One simple improvement can be done to this code using IO.Path.GetFileNameWithoutExtension method:
VB.NET:
filename = Replace(reportdir, ".xls", "")
filename = Replace(filename, ".pdf", "")
filename = Replace(filename, ".txt", "")
filename = Replace(filename, ".csv", "")
filename = Replace(filename, ".html", "")
filename2 = filename & attachmentdate & ".zip"
I will also suggest you replace VB6 style error ignoring (On Error Goto) with .Net style exception handling.

Then you have the similar VB6 style declarations and value assignments next line like this
VB.NET:
Dim to_names As String
to_names = reparray(rownum, 2).ToString
Declare the variable and assign the value when needed, to the scope it requires:
VB.NET:
Dim to_names As String = reparray(rownum, 2).ToString
 
Thanks John !!!!
For the description part and help on the code. I didnt had any prior experience on writing code in VB.net. just used to do some VBA excels ;)
i should taken time to read forum rules :D
 

Latest posts

Back
Top