Skip to content

Commit 280df01

Browse files
Grantley CullarGrantley Cullar
authored andcommitted
update readme
1 parent b70655d commit 280df01

File tree

3 files changed

+17
-32
lines changed

3 files changed

+17
-32
lines changed

README.md

Lines changed: 17 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# mail-checker
22
[![MIT Licence](https://img.shields.io/badge/license-MIT-blue)](https://opensource.org/licenses/mit-license.php)
33
[![Go Reference](https://pkg.go.dev/badge/github.com/gospacedev/mail-checker.svg)](https://pkg.go.dev/github.com/gospacedev/mail-checker)
4+
[![Go Report Card](https://goreportcard.com/badge/github.com/gospacedev/mail-checker)](https://goreportcard.com/report/github.com/gospacedev/mail-checker)
45

56
Mail Checker extracts a domain's email DMARC and SPF records.
67

@@ -14,40 +15,24 @@ Example code:
1415
```go
1516
package main
1617

17-
import (
18-
"bufio"
19-
"fmt"
20-
"log"
21-
"os"
22-
)
18+
import "github.com/gospacedev/mail-checker"
2319

2420
func main() {
25-
sci := bufio.NewScanner(os.Stdin)
26-
fmt.Println("domain, hasMX, hasSPF, sprRecord, hasDMARC, dmarcRecord")
27-
28-
for sci.Scan(){
29-
fmt.Println(CheckDomainMX(sci.Text()))
30-
}
31-
32-
33-
if err := sci.Err(); err != nil {
34-
log.Fatal("Error: Can't read from input: \n", err)
35-
}
21+
mail.CheckDomainMX("google.com", "config", "json", ".")
3622
}
37-
```
38-
39-
Run the file and enter a domain name:
4023

41-
Enter a domain name:
42-
google.com
24+
```
4325

44-
Then it should show the email information:
45-
46-
{
47-
"Domain": "google.com",
48-
"HasMX": true,
49-
"HasSPF": false,
50-
"HasDMARC": true,
51-
"SPRRecord": "",
52-
"DMARCRecord": "v=DMARC1; p=reject; rua=mailto:[email protected]"
53-
}
26+
The mail information is outputed to the config file, Mail Checker
27+
can write to JSON, TOML, and YAML config files.
28+
29+
```json
30+
{
31+
"dmarcrecord": "v=DMARC1; p=reject; rua=mailto:[email protected]",
32+
"domain": "google.com",
33+
"hasdmarc": true,
34+
"hasmx": true,
35+
"hasspf": false,
36+
"sprecord": ""
37+
}
38+
```
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)