Skip to content

Commit 6a35fd6

Browse files
authored
Merge pull request #15 from NUSComputingDev/develop
v0.1 First Working Version
2 parents a91dac1 + 583f5e0 commit 6a35fd6

17 files changed

+770
-1
lines changed

.classpath

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="src" path="src"/>
4+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
5+
<classpathentry kind="lib" path="lib/javax.mail.jar"/>
6+
<classpathentry kind="output" path="bin"/>
7+
</classpath>

.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
.mtj.tmp/
55

66
# Package Files #
7-
*.jar
87
*.war
98
*.ear
109

@@ -61,3 +60,9 @@ $RECYCLE.BIN/
6160

6261
# Windows shortcuts
6362
*.lnk
63+
/bin/
64+
65+
# private information
66+
privateinfo.txt
67+
sampleOut
68+
sample/sampleTest.html

.project

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>CompClubEmailBlast</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.jdt.core.javabuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
</buildSpec>
14+
<natures>
15+
<nature>org.eclipse.jdt.core.javanature</nature>
16+
</natures>
17+
</projectDescription>

README.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
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`

compile.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
javac -classpath lib/javax.mail.jar src/*.java

lib/javax.mail.jar

589 KB
Binary file not shown.

sample/acadliaison-logo.png

27.3 KB
Loading

sample/compclub-logo.png

3.95 KB
Loading

sample/img1.png

28.3 KB
Loading

sample/img2.png

27.3 KB
Loading

0 commit comments

Comments
 (0)