Skip to content

Commit

Permalink
finish up config vs sendgrid
Browse files Browse the repository at this point in the history
  • Loading branch information
aerth committed Apr 16, 2016
1 parent b4e7ab7 commit cdf287e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions boot.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ func loadConfig() bool {
configarray := strings.Split(configdecoded, "::::")

// Cosgo 0.6 uses new config file!
if len(configarray) < 7 {
if len(configarray) < 8 {
fmt.Println("Broken config file. Create a new one. This happens when updating cosgo version.")
if seconf.ConfirmChoice("Would you like to delete it? "+seconf.Locate(*custom), true) {
seconf.Destroy(*custom)
Expand All @@ -167,8 +167,8 @@ func loadConfig() bool {
*port = configarray[6]
*logpath = configarray[7]
*bind = configarray[8]
if configarray[8] != "" {
*logpath = configarray[8]
if *logpath == "" {
*logpath = "cosgo.log"
}
if configarray[9] == "no" {
*secure = true
Expand All @@ -190,10 +190,10 @@ func loadConfig() bool {
*mailmode = localmail
}

if configarray[3] == "" {
if configarray[4] == "" {
mandrillKey = ""
}
if configarray[4] == "" {
if configarray[5] == "" {
sendgridKey = ""
}
if *bind == "" {
Expand Down
2 changes: 1 addition & 1 deletion sendgrid.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ type Form struct {

// sendgridSend connects to the Sendgrid API and processes the form.
func sendgridSend(destinationEmail string, form *Form) (ok bool, msg string) {
log.Println("Key: " + sendgridKey)
//log.Println("Key: " + sendgridKey) // debug sendgrid
sg := sendgrid.NewSendGridClientWithApiKey(sendgridKey)
message := sendgrid.NewMail()
message.AddTo(destinationEmail)
Expand Down

0 comments on commit cdf287e

Please sign in to comment.