Showing 21 of 21 total issues
Function SendEmail
has 64 lines of code (exceeds 50 allowed). Consider refactoring. Open
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
Function SendEmail
has 9 return statements (exceeds 4 allowed). Open
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
Function SetSMTPInfo
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func SetSMTPInfo(host string, port string, user string, password string, fromName string, fromAddress string, emailsDir string){
Your code does not pass gofmt in 5 places. Go fmt your code! Open
Open
package SimpleMailer
- Exclude checks
Your code does not pass gofmt in 3 places. Go fmt your code! Open
Open
// +build ignore
- Exclude checks
Your code does not pass gofmt in 2 places. Go fmt your code! Open
Open
// +build ignore
- Exclude checks
Your code does not pass gofmt in 2 places. Go fmt your code! Open
Open
// +build ignore
- Exclude checks
Your code does not pass gofmt in 2 places. Go fmt your code! Open
Open
package SimpleMailer
- Exclude checks
comment on exported function ReplaceContentText should be of the form "ReplaceContentText ..." Open
Open
// function to replace variables as: {{USERNAME}} to USERNAME
- Exclude checks
comment on exported type Variables should be of the form "Variables ..." (with optional leading article) Open
Open
// variables in an array that will be replaced inside template
- Exclude checks
comment on exported function SetSMTPInfo should be of the form "SetSMTPInfo ..." Open
Open
// function to set the SMTP login information and email directory
- Exclude checks
comment on exported function SendMultiple should be of the form "SendMultiple ..." Open
Open
// function to send multiple emails with variables.
- Exclude checks
don't use underscores in Go names; var email_html should be emailHTML Open
Open
email_html, err := ioutil.ReadFile(configs.EmailsDir + outgoingEmail.Template)
- Exclude checks
don't use MixedCaps in package name; SimpleMailer should be simplemailer Open
Open
package SimpleMailer
- Exclude checks
comment on exported type BulkSend should be of the form "BulkSend ..." (with optional leading article) Open
Open
// Array of email addresses, subject for email, and .html template
- Exclude checks
comment on exported type Outgoing should be of the form "Outgoing ..." (with optional leading article) Open
Open
// A single email address, subject, .html template and array of Variables
- Exclude checks
comment on exported function SendBulkEmails should be of the form "SendBulkEmails ..." Open
Open
// function to send multiple emails without any variables.
- Exclude checks
comment on exported function SendEmail should be of the form "SendEmail ..." Open
Open
// function to send an email with TLS and PlainAuth
- Exclude checks
comment on exported type Config should be of the form "Config ..." (with optional leading article) Open
Open
// configs for SMTP login information and email template directory
- Exclude checks
comment on exported function SendSingle should be of the form "SendSingle ..." Open
Open
// function to send a single email from Outgoing struct
- Exclude checks