Skip to content

Include message with emails#849

Merged
ssalinas merged 6 commits intomasterfrom
include_message_with_emails
Jan 28, 2016
Merged

Include message with emails#849
ssalinas merged 6 commits intomasterfrom
include_message_with_emails

Conversation

@Calvinp
Copy link
Copy Markdown
Contributor

@Calvinp Calvinp commented Jan 19, 2016

Now that Singularity has the capability to accept optional user messages for tasks, these messages can be included in any emails sent because of user actions with messages. This commit includes that ability.
It also includes the ability to set a variable, LOG_EMAILS_FOR_DEBUG - If this variable is set to true, all emails sent will be logged in the debug logs. This allows local testing of emails without an SMTP server.

Calvin Pomerantz added 2 commits January 19, 2016 14:22
…essage will be sent in the header of any email that gets sent out becasue of that request.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest logging this at the LOG.trace() level instead, so that people can more easily control whether or not the email should be logged

@Calvinp
Copy link
Copy Markdown
Contributor Author

Calvinp commented Jan 20, 2016

These two issues have been fixed and the branch pushed again.

@Calvinp
Copy link
Copy Markdown
Contributor Author

Calvinp commented Jan 20, 2016

Whoops, I lied before, forgot about making it trace level. Now they're both fixed.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can do without the LOG_EMAILS_FOR_DEBUG. We can control the logging level for each class in the configuration for Singularity, so just putting it at trace should be enough.

Also for logging, you can so something more like this rather that using "string" + "string"

LOG.trace("Sending email: {}, to: {}, cc: {}", body, toList, ccList)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For readability I've found it to be easier to put the recipients first and the body last so you're not scrolling through a wall of HTML looking for the recipient at the end

@Calvinp
Copy link
Copy Markdown
Contributor Author

Calvinp commented Jan 20, 2016

Fixed

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

super nit-picky, but can we get rid of these extra new lines here and down by the LOG.trace

@Calvinp
Copy link
Copy Markdown
Contributor Author

Calvinp commented Jan 20, 2016

Not sure how those got there in the first place, but they're gone now.

@tpetr tpetr modified the milestone: 0.4.9 Jan 27, 2016
ssalinas added a commit that referenced this pull request Jan 28, 2016
@ssalinas ssalinas merged commit 8f5fbf6 into master Jan 28, 2016
@ssalinas ssalinas deleted the include_message_with_emails branch January 28, 2016 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants