{"action":"opened","issue":{"url":"https://api.github.com/repos/guileen/node-sendmail/issues/20","repository_url":"https://api.github.com/repos/guileen/node-sendmail","labels_url":"https://api.github.com/repos/guileen/node-sendmail/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/guileen/node-sendmail/issues/20/comments","events_url":"https://api.github.com/repos/guileen/node-sendmail/issues/20/events","html_url":"https://github.com/guileen/node-sendmail/issues/20","id":191467938,"number":20,"title":"Error with mail.content when trying to send like the example states (documentation out of date?)","user":{"login":"fabianmoronzirfas","id":315106,"avatar_url":"https://avatars.githubusercontent.com/u/315106?v=3","gravatar_id":"","url":"https://api.github.com/users/fabianmoronzirfas","html_url":"https://github.com/fabianmoronzirfas","followers_url":"https://api.github.com/users/fabianmoronzirfas/followers","following_url":"https://api.github.com/users/fabianmoronzirfas/following{/other_user}","gists_url":"https://api.github.com/users/fabianmoronzirfas/gists{/gist_id}","starred_url":"https://api.github.com/users/fabianmoronzirfas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabianmoronzirfas/subscriptions","organizations_url":"https://api.github.com/users/fabianmoronzirfas/orgs","repos_url":"https://api.github.com/users/fabianmoronzirfas/repos","events_url":"https://api.github.com/users/fabianmoronzirfas/events{/privacy}","received_events_url":"https://api.github.com/users/fabianmoronzirfas/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-24T09:15:58Z","updated_at":"2016-11-24T09:15:58Z","closed_at":null,"body":"## Expected Behavior\r\n\r\nShould send mail with body defined in key `html` Using the `text` key instead of `html` gives the same error.  \r\n\r\n## Current Behavior  \r\n\r\n    var sendmail = require('sendmail')();\r\n    sendmail({\r\n      from: 'no-reply@foo.tld',\r\n      to: 'foo@bah.tld',\r\n      subject: 'test sendmail',\r\n      html: 'Mail of test sendmail '\r\n    }, function(err, reply) {\r\n      console.log(err && err.stack);\r\n      console.dir(reply);\r\n    });\r\n\r\nThrows error:  \r\n\r\n    /path/to/file/sendmail.js:293\r\n        content = mail.content.replace(/\\r\\n/g, '\\n').replace(/\\n/g, '\\r\\n');\r\n                              ^\r\n    \r\n    TypeError: Cannot read property 'replace' of undefined\r\n        at sendmail (/Users/icke/Documents/interface.fh-potsdam.de/wp-updater/node_modules/sendmail/sendmail.js:293:27)\r\n\r\n\r\n## Possible Solution\r\n\r\nI switched to `content` for the mail body and everything worked fine. Is your documentation out of date?  \r\n\r\n\r\n## Steps to Reproduce (for bugs)\r\n<!--- Provide a link to a live example, or an unambiguous set of steps to -->\r\n<!--- reproduce this bug. Include code to reproduce, if relevant -->\r\n1. Use code provided in REAME.md and run it\r\n\r\n\r\n## Context\r\n<!--- How has this issue affected you? What are you trying to accomplish? -->\r\n<!--- Providing context helps us come up with a solution that is most useful in the real world -->\r\n\r\n## Your Environment\r\n<!--- Include as many relevant details about the environment you experienced the bug in -->\r\n* Version used: Occurs on macOS 10.12.1 and on Debian Jessie 8.5  \r\n* Environment name and version: Node v4.6.2\r\n* Operating System and version (desktop or mobile): Debian and macOS\r\n\r\n"}}
{"actor":{"display_login":"fabianmoronzirfas"}}