Hunterlong/SimpleMailer

View on GitHub

Showing 21 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

        Your code does not pass gofmt in 5 places. Go fmt your code!
        Open

        package SimpleMailer
        Severity: Minor
        Found in simplemailer.go by gofmt

        Your code does not pass gofmt in 3 places. Go fmt your code!
        Open

        // +build ignore
        Severity: Minor
        Found in examples/send_multiple_emails.go by gofmt

        Your code does not pass gofmt in 2 places. Go fmt your code!
        Open

        // +build ignore
        Severity: Minor
        Found in examples/send_no_vars_email.go by gofmt

        Your code does not pass gofmt in 2 places. Go fmt your code!
        Open

        // +build ignore
        Severity: Minor
        Found in examples/send_single_email.go by gofmt

        Your code does not pass gofmt in 2 places. Go fmt your code!
        Open

        package SimpleMailer
        Severity: Minor
        Found in emailer.go by gofmt

        comment on exported function ReplaceContentText should be of the form "ReplaceContentText ..."
        Open

        // function to replace variables as: {{USERNAME}} to USERNAME
        Severity: Minor
        Found in emailer.go by golint

        comment on exported type Variables should be of the form "Variables ..." (with optional leading article)
        Open

        // variables in an array that will be replaced inside template
        Severity: Minor
        Found in simplemailer.go by golint

        comment on exported function SetSMTPInfo should be of the form "SetSMTPInfo ..."
        Open

        // function to set the SMTP login information and email directory
        Severity: Minor
        Found in simplemailer.go by golint

        comment on exported function SendMultiple should be of the form "SendMultiple ..."
        Open

        // function to send multiple emails with variables.
        Severity: Minor
        Found in simplemailer.go by golint

        don't use underscores in Go names; var email_html should be emailHTML
        Open

                email_html, err := ioutil.ReadFile(configs.EmailsDir + outgoingEmail.Template)
        Severity: Minor
        Found in emailer.go by golint

        don't use MixedCaps in package name; SimpleMailer should be simplemailer
        Open

        package SimpleMailer
        Severity: Minor
        Found in simplemailer.go by golint

        comment on exported type BulkSend should be of the form "BulkSend ..." (with optional leading article)
        Open

        // Array of email addresses, subject for email, and .html template
        Severity: Minor
        Found in simplemailer.go by golint

        comment on exported type Outgoing should be of the form "Outgoing ..." (with optional leading article)
        Open

        // A single email address, subject, .html template and array of Variables
        Severity: Minor
        Found in simplemailer.go by golint

        comment on exported function SendBulkEmails should be of the form "SendBulkEmails ..."
        Open

        // function to send multiple emails without any variables.
        Severity: Minor
        Found in simplemailer.go by golint

        comment on exported function SendEmail should be of the form "SendEmail ..."
        Open

        // function to send an email with TLS and PlainAuth
        Severity: Minor
        Found in emailer.go by golint

        comment on exported type Config should be of the form "Config ..." (with optional leading article)
        Open

        // configs for SMTP login information and email template directory
        Severity: Minor
        Found in simplemailer.go by golint

        comment on exported function SendSingle should be of the form "SendSingle ..."
        Open

        // function to send a single email from Outgoing struct
        Severity: Minor
        Found in simplemailer.go by golint
        Severity
        Category
        Status
        Source
        Language