Jump to content
Ketarin forum

Email notification on update


mickythekiller
 Share

Recommended Posts

  • 1 month later...

Download SwithMail and put it in your path:

http://www.tbare.com/software/swithmail/

 

File, Settings, Commands, "Before updating an application". Set the Command type to "Batch script". Enter the following in the command box:

swithmail.exe /s /from "sender@example.com" /pass "YourPassword" /server smtp.example.com /p 465 /ssl /toaddress "mickythekiller@example.com" /subject "Ketarin update {appname:replace:&:^&}" /body "{appname:replace:&:^&} {version:replace:&:^&}"

If you want to send yourself a *list* of all the updates instead of send yourself a new message for each one, then generate a list first (with "echo {appname:replace:&:^&} {version:replace:&:^&}>>c:\path\file.ext")  and use /bodytxt "c:\path\file.ext" to embed the contents of the file with the "after updating all applications" command.

Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...
  • 3 months later...

It's also possible to do this without using a 3rd party app using the same method mentioned, but selecting C# script.  Here's an example of what I do (modified to conform to shawn's example):

System.Net.Mail.MailMessage message = new System.Net.Mail.MailMessage();
message.To.Add("mickythekiller@example.com");
message.Subject = app.Variables.ReplaceAllInString("Ketarin update {appname:replace:&:^&}");
message.Body = app.Variables.ReplaceAllInString("{appname:replace:&:^&} {version:replace:&:^&}");
message.From = new System.Net.Mail.MailAddress("sender@example.com");
System.Net.Mail.SmtpClient smtp = new System.Net.Mail.SmtpClient("smtp.example.com");
smtp.Send(message);

Further details on how these .NET Framework classes work can be found here:

 

https://msdn.microsoft.com/en-us/library/system.net.mail.mailmessage

https://msdn.microsoft.com/en-us/library/system.net.mail.smtpclient

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.