2
2
# gomail
3
3
4
4
One day my friend asked me if it's possible to automate sending e-mails, so I
5
- decided it's a great opportunity to practise Go and here it is - a tiny program
5
+ decided it's a great opportunity to practice Go and here it is - a tiny program
6
6
that can send e-mails via SMTP.
7
7
8
8
** It was created for educational purposes only, don't use it to spread spam.**
9
9
10
+ ** You need to have an account on a mail server (e. g. Gmail, Outlook or own
11
+ server) to use this program!**
12
+
10
13
## How to install
11
14
12
15
### Stable release
@@ -19,7 +22,7 @@ https://github.com/alexcoder04/gomail/releases/latest.
19
22
``` sh
20
23
git clone https://github.com/alexcoder04/gomail
21
24
cd gomail
22
- make linux # or make windows
25
+ make linux # or ` make windows`
23
26
```
24
27
25
28
## How to use (important!)
@@ -30,32 +33,38 @@ executable is run in. Those are:
30
33
31
34
### ` settings.yml `
32
35
36
+ You can use another file by passing the ` -s ` flag (e. g. ` gomail -s mysettings.txt ` )
37
+
33
38
The host address can vary depending on your e-mail provider, most likely it's
34
- something like * mail.domain.tld* or * smtp.domain.tld* . The port also is
39
+ something like * mail.domain.tld* or * smtp.domain.tld* . The port is also
35
40
different for different e-mail providers.
36
41
37
42
For my provider, the username is the part of the address before the @-sign,
38
- but it may be the full address or something completely different for your
39
- e-mail provider.
43
+ but it may be the full address (e. g. on Gmail) or something completely
44
+ different for your e-mail provider.
40
45
41
46
``` yml
42
47
43
48
Addr : smtp.example.com:587
44
49
Host : smtp.example.com
45
- Subject : Hello friends!
46
50
47
51
Password : YourSecureP4ssw0rd
52
+ Subject : Hello friends!
48
53
` ` `
49
54
50
55
### ` recipients.txt`
51
56
57
+ You can use another file by passing the `-r` flag (e. g. `gomail -r friendslist.txt`)
58
+
52
59
` ` ` text
53
60
54
61
55
62
` ` `
56
63
57
64
# ## `mail.txt`
58
65
66
+ You can use another file by passing the `-b` flag (e. g. `gomail -b hello.txt`)
67
+
59
68
` ` ` text
60
69
Hello friends,
61
70
0 commit comments