Hunterlong/SimpleMailer

View on GitHub

Showing 3 of 21 total issues

Function SendEmail has 64 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func SendEmail(outgoingEmail Outgoing) bool {
        email_html, err := ioutil.ReadFile(configs.EmailsDir + outgoingEmail.Template)
        from := mail.Address{configs.SMTPname, configs.SMTPfrom}
        to := mail.Address{"", outgoingEmail.Email}
        subj := outgoingEmail.Subject
Severity: Minor
Found in emailer.go - About 1 hr to fix

    Function SendEmail has 9 return statements (exceeds 4 allowed).
    Open

    func SendEmail(outgoingEmail Outgoing) bool {
            email_html, err := ioutil.ReadFile(configs.EmailsDir + outgoingEmail.Template)
            from := mail.Address{configs.SMTPname, configs.SMTPfrom}
            to := mail.Address{"", outgoingEmail.Email}
            subj := outgoingEmail.Subject
    Severity: Major
    Found in emailer.go - About 55 mins to fix

      Function SetSMTPInfo has 7 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      func SetSMTPInfo(host string, port string, user string, password string, fromName string, fromAddress string, emailsDir string){
      Severity: Major
      Found in simplemailer.go - About 50 mins to fix
        Severity
        Category
        Status
        Source
        Language