Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added options to send plain or html emails #1325

Merged
merged 6 commits into from
Mar 7, 2016

Conversation

Jngai
Copy link
Contributor

@Jngai Jngai commented Feb 29, 2016

Fixes #1256.

@Jngai
Copy link
Contributor Author

Jngai commented Feb 29, 2016

@dsander @cantino I tested this both on gmail and yahoo email. Everything is good. I do need to add a test though. Feel free to take a look.

@Jngai
Copy link
Contributor Author

Jngai commented Feb 29, 2016

#1256

@Jngai
Copy link
Contributor Author

Jngai commented Feb 29, 2016

test added

@@ -23,6 +23,10 @@ class EmailAgent < Agent

You can provide a `from` address for the email, or leave it blank to default to the value of `EMAIL_FROM_ADDRESS` (`#{ENV['EMAIL_FROM_ADDRESS']}`).

You can provide a `content_type` for the email and specify `text/plain` or `text/html` to be sent.

If you do not specify `content_type`, then the recipient email server will determine the correct rendering.
Copy link
Member

Choose a reason for hiding this comment

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

Be worth adding to the email_digest_agent too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The code for email digest is very similar to email agent. I am just going to add it here.

Copy link
Member

Choose a reason for hiding this comment

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

Let's make this one paragraph (here and below).

You can provide a `content_type` for the email and specify `text/plain` or `text/html` to be sent. If you do not specify `content_type`, then the recipient email server will determine the correct rendering.

@Jngai
Copy link
Contributor Author

Jngai commented Mar 1, 2016

Tested email digest with yahoo but still need to write a test for it.

@Jngai
Copy link
Contributor Author

Jngai commented Mar 1, 2016

@cantino I am good and is currently waiting to be reviewed.

@cantino
Copy link
Member

cantino commented Mar 2, 2016

Thanks, I'll test this out soon and merge it. I'm very busy for the next couple of days.

@Jngai
Copy link
Contributor Author

Jngai commented Mar 2, 2016

Please take your time. Its no rush.

@cantino
Copy link
Member

cantino commented Mar 7, 2016

Tested this and it works for me! For gmail, the default seems to allow HTML in events. Setting it to text/plain turned this off, as expected.

@Jngai
Copy link
Contributor Author

Jngai commented Mar 7, 2016

@cantino just made it into a paragraph. Also I think most web servers default to html.

cantino added a commit that referenced this pull request Mar 7, 2016
@cantino cantino merged commit 78cbf56 into huginn:master Mar 7, 2016
@cantino
Copy link
Member

cantino commented Mar 7, 2016

Thanks @Jngai!

@Jngai Jngai deleted the add_text_html_option_to_email_agent branch March 7, 2016 16:46
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.

2 participants