|
| 1 | +# CompClubEmailBlast # |
| 2 | + |
| 3 | +`CompClubEmailBlast` is designed to automate the process of sending e-mail blast for NUS Computing Club. It uses the e-mail blast template for the Club. |
| 4 | + |
| 5 | +There is no error checking, the inputs are assumed to be correct. |
| 6 | + |
| 7 | +## Assumptions ## |
| 8 | + |
| 9 | +The programme takes many assumptions. Some of them are: |
| 10 | + |
| 11 | +1. The inputs are well formed as expected by the programme, there is no error checking done by the programme |
| 12 | +2. For every e-mail item, there's at least a title; the image, text, and link are optional |
| 13 | +3. The information on the no. of items, titles, and links must be available in `main.txt` in the folder that contains all the contents. Each item is listed in `main.txt` chronologically. A title is needed for each item while the link&link-text pair is optional |
| 14 | +4. Text files are named as `txti.html` where `i` is a number greater than or equal to `1` |
| 15 | +5. Image files are named as `imgi.html` where `i` is a number greater than or equal to `1` |
| 16 | + |
| 17 | +## Email Template ## |
| 18 | + |
| 19 | +The e-mail template can be viewed as consisting of the following: |
| 20 | + |
| 21 | +1. Header |
| 22 | +2. Content Item(s), each with: |
| 23 | + * Title |
| 24 | + * Image(optional) |
| 25 | + * Text(optional) |
| 26 | + * Link(optional) |
| 27 | +3. Footer |
| 28 | + |
| 29 | +## Dependencies ## |
| 30 | + |
| 31 | +These dependencies are included in the programme |
| 32 | + |
| 33 | +* JavaMail API (`https://java.net/projects/javamail/pages/Home`) |
| 34 | + |
| 35 | +## Argument inputs for CCmailer ## |
| 36 | + |
| 37 | +`CCmailer` takes in 5 arguments: |
| 38 | + * name of the file containing private info (either relative path or static path) |
| 39 | + * input folder containing the inputs (ending with "/") |
| 40 | + * output folder to write the output to (ending with "/") |
| 41 | + * name of the output html file (This html file will be placed in the output folder) |
| 42 | + * type of e-mail (either emailBlast or acadAdvisory) |
| 43 | + |
| 44 | +## Sample Instructions ## |
| 45 | + |
| 46 | +These steps will demonstrate the basic functionality of the programme using the sample files |
| 47 | + |
| 48 | +1. update `samplePrivateInfo.txt` file with the required information |
| 49 | +2. remove `acadliaison-logo.png` from the sample folder unless you are test sending Academic Advisory |
| 50 | +3. Run `CCmailer` using the 5 arguments: `samplePrivateInfo.txt sample/ sample/ sampleTest.html emailBlast` using Eclipse IDE <b>OR</b> for manual compilation, follow these steps: |
| 51 | + 1. run `compile.sh` which will compile the files in the folder `src`. If you can't run it, ensure that you have the execution rights for the file |
| 52 | + 2. Change to the `src` folder |
| 53 | + 3. run CCmailer with the classpath and the 5 arguments: For example, `java -cp ".:../lib/javax.mail.jar" CCmailer ../../samplePrivateinfo.txt ../sample/ ../sample/ sampleTest.html emailBlast` |
| 54 | +4. Check that you receive the sample e-mail |
| 55 | +5. The ouput html, `sampleTest.html`, is in the `sample/` folder |
| 56 | + |
| 57 | +## Special Instructions ## |
| 58 | + |
| 59 | +`java -cp ".:../lib/javax.mail.jar" CCmailer ../../privateinfo.txt ../../../Documents/2016.09.12/ ../../../Websites/newsletters.nuscomputing.com/2016/September/12/ index.html acadAdvisory` |
0 commit comments