{"action":"created","issue":{"url":"https://api.github.com/repos/meteor/meteor/issues/4768","labels_url":"https://api.github.com/repos/meteor/meteor/issues/4768/labels{/name}","comments_url":"https://api.github.com/repos/meteor/meteor/issues/4768/comments","events_url":"https://api.github.com/repos/meteor/meteor/issues/4768/events","html_url":"https://github.com/meteor/meteor/issues/4768","id":95642804,"number":4768,"title":"Ability to not pass `text` in Accounts.emailTemplates.*","user":{"login":"dandv","id":33569,"avatar_url":"https://avatars.githubusercontent.com/u/33569?v=3","gravatar_id":"","url":"https://api.github.com/users/dandv","html_url":"https://github.com/dandv","followers_url":"https://api.github.com/users/dandv/followers","following_url":"https://api.github.com/users/dandv/following{/other_user}","gists_url":"https://api.github.com/users/dandv/gists{/gist_id}","starred_url":"https://api.github.com/users/dandv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dandv/subscriptions","organizations_url":"https://api.github.com/users/dandv/orgs","repos_url":"https://api.github.com/users/dandv/repos","events_url":"https://api.github.com/users/dandv/events{/privacy}","received_events_url":"https://api.github.com/users/dandv/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/meteor/meteor/labels/Project:Accounts%20(in%20user%20apps)","name":"Project:Accounts (in user apps)","color":"eb6420"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-17T11:54:09Z","updated_at":"2015-07-21T22:28:46Z","closed_at":"2015-07-21T22:28:46Z","body":"I'm trying to use Mandrill's feature of [automatically generating plain-text from HTML](https://mandrill.zendesk.com/hc/en-us/articles/205582117-Using-SMTP-Headers-to-customize-your-messages#automatically-generate-plain-text-from-html-content) if a certain SMTP header is specified. This is handy because Marketing wants to edit the email template via Mandrill's UI, and have the text part automatically generated. In my code, I call [Mandrill's template rendering API](https://mandrillapp.com/api/docs/templates.nodejs.html#method=render), then assign the result to `Accounts.emailTemplates.{enrollAccount|resetPassword|verifyEmail}.html`.\r\n\r\nThe problem is that `Accounts.emailTemplates.{enrollAccount|resetPassword|verifyEmail}.text` expects a function, and if one is missing, it adds a default text part to the email, e.g.\r\n\r\n> Hello,\r\n\r\n> To start using the service, simply click the link below.\r\n\r\n> http://localhost:3000/#/enroll-account/<secret>\r\n\r\n> Thanks.\r\n\r\nI've tried assigning `null` and `''` but that didn't work. (`TypeError: Property 'text' of object #<Object> is not a function`)."},"comment":{"url":"https://api.github.com/repos/meteor/meteor/issues/comments/123498321","html_url":"https://github.com/meteor/meteor/issues/4768#issuecomment-123498321","issue_url":"https://api.github.com/repos/meteor/meteor/issues/4768","id":123498321,"user":{"login":"anubhav94","id":3237064,"avatar_url":"https://avatars.githubusercontent.com/u/3237064?v=3","gravatar_id":"","url":"https://api.github.com/users/anubhav94","html_url":"https://github.com/anubhav94","followers_url":"https://api.github.com/users/anubhav94/followers","following_url":"https://api.github.com/users/anubhav94/following{/other_user}","gists_url":"https://api.github.com/users/anubhav94/gists{/gist_id}","starred_url":"https://api.github.com/users/anubhav94/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anubhav94/subscriptions","organizations_url":"https://api.github.com/users/anubhav94/orgs","repos_url":"https://api.github.com/users/anubhav94/repos","events_url":"https://api.github.com/users/anubhav94/events{/privacy}","received_events_url":"https://api.github.com/users/anubhav94/received_events","type":"User","site_admin":false},"created_at":"2015-07-21T22:28:46Z","updated_at":"2015-07-21T22:28:46Z","body":"Hey @dandv! The simple fix could've been to set `Accounts.emailTemplates.{enrollAccount|resetPassword|verifyEmail}.text` to be a function that returns an empty string. However, I just pushed out a fix that allows `text` to not be a function, which you can see in 567db56"}}