Advanced Guide

This is a more advanced guide for my "Startup Email Notificaton Program". For those who want to add their own commands, this is the guide explaining the code.

Latest Release:
You can find and download the latest post of this pogram here at my downlaods page.


Watch this video to see how to open this program in IntelliJ

[Segment #1] Package & imports

This is the imports section, this can mostly be ignored if you have worked with java but for those with less experance you can see the package hierarchy. All of your imports go here and you can see what methods from the package is used. Imports

[Segment #2] Global-ish Variables

This section is dedicated to easy setting changing and where most of the class variables are stored, they are setup to use standard convention of all caps with underscores for spaces to denote that they are static variables. If you want to turn off a setting (they all have long names to make them self-explanatory), you can just switch them from true to false or vice versa. Strings can just be modified as normal. ErrorReport is the only default non-static class variable and is used for saving error logs. Static Class Variables

[Segment #3] Attempt to get host address.

This code is here for debugging purposes as part of a development build and will not be present in future versions.

One of the first things that this program tries to do is obtain your host address, in this case this code will always print this out as there is no settings check with it which will be changed in a later version. This will look at all of your interfaces so it may provide unnessery information. To hard code this to avoid lookinf in the first place, switch the true's to false. Start Of Main Method

[Segment #4]

The code here is dense but it is broken into two parts, starting out, there are flags for strings that will later report IP's, to keep everything standardised I recomend following the same structure. This is also where the email structure is made before sending. I you wish to include or change anything else in the email, this is where you should do that as its built to be as user friendly as possable in this section to be organised. Calls ip and sets local variables, also sends email here.

[Segment #5] Get IP Method

This section of code is where the get IP method used by the other sections is used, it is not recomended to change the code here, if you want to change the souce of an IP call you can change strings in the string arrays as part of Segment #2 and then the index # of the corresponding url call (located in the next grouping of variables below the arrays). Method that gets the IP addresses Method that gets the IP addresses continued

[Segment #6] Get HostName and Printparts Method

This section contains the method to get both the hostname wich can be modifed or used as an example for making your own fit in, Printparts is not used in this version by default, but contains usefull code for reading parts of an email if you wish to setup two way commucation over email to this program or have a congif file based in it's email which will control the setting used. Get Hostname and Printparts Method

[Segment #7] Wrapped call to send email

This call will be here for all future versions (as much as it can be) and will be kept for backwards compatibaly if something ever comes up.

Self explanatory? Allows easy calls for the main account while allowing the modularity of having a specific call email method. Short wrapped call

[Segment #8]

This call will be here for all future versions (as much as it can be) and will be kept for backwards compatibaly if something ever comes up.

This method is where the actual call to send an email is made and is where new users wanting more customizability but without much programming can change the strings druing printout or hardcode an addition to the subject or contents to identify the bot sending the email instead of doing this as part of section #4. Send email method

Main
F.A.Q.
Quickstart
Advanced