-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
added options to send plain or html emails #1325
Conversation
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. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Tested email digest with yahoo but still need to write a test for it. |
@cantino I am good and is currently waiting to be reviewed. |
Thanks, I'll test this out soon and merge it. I'm very busy for the next couple of days. |
Please take your time. Its no rush. |
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. |
@cantino just made it into a paragraph. Also I think most web servers default to html. |
added options to send plain or html emails
Thanks @Jngai! |
Fixes #1256.