I had the need for several automated jobs to be able to exchange files securely with partners via the Secure FTP (SFTP). I chose powershell because the jobs:
get executed on windows nodes. It is less overhead than creating console apps in .NET
required things like querying databases, transforming data, and archiving files
I spent a little bit of time looking into different options, and decided to utilize the latest version of the WinSCP library provided the required options...
[More]
I know I haven't posted much code on this blog, but this snippet I found valuable.
While I can certainly host my SMTP server, it would be so much easier if I could just Google's (since I am using Google Apps for my site's email). Below is the code you can use to send email's via Google's SMTP server. enjoy...
C#
string GmailUserName="myusername@gmail.com";
string GmailPassword="mypassword";
string SendTo="sendto@gmail.com";
string EmailSubject="Test Subject";
s...
[More]