Skip to content

Commit

Permalink
Fix Sendgrid to v2��:
Browse files Browse the repository at this point in the history
  • Loading branch information
aerth committed Aug 8, 2016
1 parent 2cb9789 commit 0c4f183
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ var (
gpg = flag.String("gpg", "", "Path to ascii-armored GPG public key (for encrypting messages.)")
customExtension = flag.String("ext", "", "Serve extra static files. Uses regex. \n\tExample: -ext \"pdf|txt|html\"")
sendgridKey = flag.String("sg", "", "Sendgrid API key (disables mbox)")
destinationEmail= flag.String("to", "", "Your email address (-sg flag required)")
dest = flag.String("to", "", "Your email address (-sg flag required)")
logfile = flag.String("log", "", "Use a log file instead of stdout\n\tExample: -log cosgo.log -debug")
mboxfile = flag.String("mbox", "cosgo.mbox", "Custom mbox file name\n\tExample: -mbox custom.mbox")
)
Expand Down Expand Up @@ -131,6 +131,9 @@ func main() {
log.Fatal("Hint: touch ./cosgo.mbox, or chown/chmod it so that the cosgo process can access it.")
os.Exit(1)
}
if *dest != "" {
destinationEmail = *dest
}
mbox.Destination = destinationEmail
mbox.Mail = log.New(f, "", 0)
if *nolog {
Expand Down
3 changes: 2 additions & 1 deletion sendgrid.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import (

"github.com/aerth/mbox"
"github.com/goware/emailx"
sendgrid "github.com/sendgrid/sendgrid-go"
//sendgrid "github.com/sendgrid/sendgrid-go"
sendgrid "gopkg.in/sendgrid/sendgrid-go.v2"
)

// Form is our email struct
Expand Down

0 comments on commit 0c4f183

Please sign in to comment.