{"action":"created","comment":{"url":"https://api.github.com/repos/vert-x3/vertx-mail-service/pulls/comments/24937793","id":24937793,"diff_hunk":"@@ -0,0 +1,152 @@\n+package io.vertx.ext.mail;\n+\n+import io.vertx.codegen.annotations.DataObject;\n+import io.vertx.core.json.JsonObject;\n+\n+import java.util.Arrays;\n+import java.util.List;\n+import java.util.Objects;\n+\n+/**\n+ * @author <a href=\"http://oss.lehmann.cx/\">Alexander Lehmann</a>\n+ */\n+\n+@DataObject\n+public class MailAttachment {\n+\n+  // note that this must be a String only containing chars 0-255\n+  // to represent the binary file data\n+  private String data;\n+  // if filename is set, data will be read from the filesystem\n+  // TODO: this is not yet implemented\n+  // private String filename;\n+  // name is the descriptive filename that will be put into the mail\n+  // i.e. usually a local filename without path\n+  // will be filled based on filename if not set\n+  // this can be set to \"\" to omit the filename attribute\n+  private String name;\n+  private String contentType;\n+  private String disposition;\n+  private String description;\n+\n+  /**\n+   * @return the filename\n+   */\n+  // public String getFilename() {\n+  // return filename;\n+  // }\n+\n+  /**\n+   * @param filename\n+   *          the filename to set\n+   */\n+  // public MailAttachment setFilename(String filename) {\n+  // this.filename = filename;\n+  // return this;\n+  // }\n+\n+  public String getName() {\n+    return name;\n+  }\n+\n+  public MailAttachment setName(String name) {\n+    this.name = name;\n+    return this;\n+  }\n+\n+  public MailAttachment() {\n+  }\n+\n+  public MailAttachment(MailAttachment other) {\n+    Objects.requireNonNull(other);\n+    this.data = other.data;\n+    this.name = other.name;\n+    this.contentType = other.contentType;\n+    this.disposition = other.disposition;\n+    this.description = other.description;\n+  }\n+\n+  public MailAttachment(JsonObject json) {\n+    Objects.requireNonNull(json);\n+    this.data = json.getString(\"data\");\n+    this.name = json.getString(\"name\");\n+    this.contentType = json.getString(\"content-type\");\n+    this.disposition = json.getString(\"disposition\");\n+    this.description = json.getString(\"description\");\n+  }\n+\n+  public String getData() {\n+    return data;\n+  }\n+\n+  public MailAttachment setData(String data) {","path":"src/main/java/io/vertx/ext/mail/MailAttachment.java","position":82,"original_position":82,"commit_id":"ba4a117b81ed30b9891030060c51bdcceac6a333","original_commit_id":"ba4a117b81ed30b9891030060c51bdcceac6a333","user":{"login":"alexlehm","id":156144,"avatar_url":"https://avatars.githubusercontent.com/u/156144?v=3","gravatar_id":"","url":"https://api.github.com/users/alexlehm","html_url":"https://github.com/alexlehm","followers_url":"https://api.github.com/users/alexlehm/followers","following_url":"https://api.github.com/users/alexlehm/following{/other_user}","gists_url":"https://api.github.com/users/alexlehm/gists{/gist_id}","starred_url":"https://api.github.com/users/alexlehm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexlehm/subscriptions","organizations_url":"https://api.github.com/users/alexlehm/orgs","repos_url":"https://api.github.com/users/alexlehm/repos","events_url":"https://api.github.com/users/alexlehm/events{/privacy}","received_events_url":"https://api.github.com/users/alexlehm/received_events","type":"User","site_admin":false},"body":"this supports binary attachments as well, however this doesn't well together with the json format for the bus. I have an example how to attachment an image by reading it into a string in MailTest.java. I would also be possible to read the files before sending the message but this has to happen on the client side of the eb since the files may not be available on the server instance that runs MailServiceVerticle","created_at":"2015-02-18T20:33:11Z","updated_at":"2015-02-18T20:33:11Z","html_url":"https://github.com/vert-x3/vertx-mail-service/pull/1#discussion_r24937793","pull_request_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/vert-x3/vertx-mail-service/pulls/comments/24937793"},"html":{"href":"https://github.com/vert-x3/vertx-mail-service/pull/1#discussion_r24937793"},"pull_request":{"href":"https://api.github.com/repos/vert-x3/vertx-mail-service/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/vert-x3/vertx-mail-service/pulls/1","id":29424489,"html_url":"https://github.com/vert-x3/vertx-mail-service/pull/1","diff_url":"https://github.com/vert-x3/vertx-mail-service/pull/1.diff","patch_url":"https://github.com/vert-x3/vertx-mail-service/pull/1.patch","issue_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/issues/1","number":1,"state":"open","locked":false,"title":"pr for first master version of the tool","user":{"login":"alexlehm","id":156144,"avatar_url":"https://avatars.githubusercontent.com/u/156144?v=3","gravatar_id":"","url":"https://api.github.com/users/alexlehm","html_url":"https://github.com/alexlehm","followers_url":"https://api.github.com/users/alexlehm/followers","following_url":"https://api.github.com/users/alexlehm/following{/other_user}","gists_url":"https://api.github.com/users/alexlehm/gists{/gist_id}","starred_url":"https://api.github.com/users/alexlehm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexlehm/subscriptions","organizations_url":"https://api.github.com/users/alexlehm/orgs","repos_url":"https://api.github.com/users/alexlehm/repos","events_url":"https://api.github.com/users/alexlehm/events{/privacy}","received_events_url":"https://api.github.com/users/alexlehm/received_events","type":"User","site_admin":false},"body":"rebased initial-work to be based on empty master\r\n","created_at":"2015-02-17T08:17:27Z","updated_at":"2015-02-18T20:33:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4ae4d64a1915c152c3ea3fbc9f3937e6936f6373","assignee":{"login":"purplefox","id":701906,"avatar_url":"https://avatars.githubusercontent.com/u/701906?v=3","gravatar_id":"","url":"https://api.github.com/users/purplefox","html_url":"https://github.com/purplefox","followers_url":"https://api.github.com/users/purplefox/followers","following_url":"https://api.github.com/users/purplefox/following{/other_user}","gists_url":"https://api.github.com/users/purplefox/gists{/gist_id}","starred_url":"https://api.github.com/users/purplefox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/purplefox/subscriptions","organizations_url":"https://api.github.com/users/purplefox/orgs","repos_url":"https://api.github.com/users/purplefox/repos","events_url":"https://api.github.com/users/purplefox/events{/privacy}","received_events_url":"https://api.github.com/users/purplefox/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/pulls/1/commits","review_comments_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/pulls/1/comments","review_comment_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/pulls/comments/{number}","comments_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/issues/1/comments","statuses_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/statuses/ba4a117b81ed30b9891030060c51bdcceac6a333","head":{"label":"vert-x3:initial-work","ref":"initial-work","sha":"ba4a117b81ed30b9891030060c51bdcceac6a333","user":{"login":"vert-x3","id":8124623,"avatar_url":"https://avatars.githubusercontent.com/u/8124623?v=3","gravatar_id":"","url":"https://api.github.com/users/vert-x3","html_url":"https://github.com/vert-x3","followers_url":"https://api.github.com/users/vert-x3/followers","following_url":"https://api.github.com/users/vert-x3/following{/other_user}","gists_url":"https://api.github.com/users/vert-x3/gists{/gist_id}","starred_url":"https://api.github.com/users/vert-x3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vert-x3/subscriptions","organizations_url":"https://api.github.com/users/vert-x3/orgs","repos_url":"https://api.github.com/users/vert-x3/repos","events_url":"https://api.github.com/users/vert-x3/events{/privacy}","received_events_url":"https://api.github.com/users/vert-x3/received_events","type":"Organization","site_admin":false},"repo":{"id":30866500,"name":"vertx-mail-service","full_name":"vert-x3/vertx-mail-service","owner":{"login":"vert-x3","id":8124623,"avatar_url":"https://avatars.githubusercontent.com/u/8124623?v=3","gravatar_id":"","url":"https://api.github.com/users/vert-x3","html_url":"https://github.com/vert-x3","followers_url":"https://api.github.com/users/vert-x3/followers","following_url":"https://api.github.com/users/vert-x3/following{/other_user}","gists_url":"https://api.github.com/users/vert-x3/gists{/gist_id}","starred_url":"https://api.github.com/users/vert-x3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vert-x3/subscriptions","organizations_url":"https://api.github.com/users/vert-x3/orgs","repos_url":"https://api.github.com/users/vert-x3/repos","events_url":"https://api.github.com/users/vert-x3/events{/privacy}","received_events_url":"https://api.github.com/users/vert-x3/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vert-x3/vertx-mail-service","description":"","fork":false,"url":"https://api.github.com/repos/vert-x3/vertx-mail-service","forks_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/forks","keys_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/teams","hooks_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/hooks","issue_events_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/issues/events{/number}","events_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/events","assignees_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/assignees{/user}","branches_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/branches{/branch}","tags_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/tags","blobs_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/git/refs{/sha}","trees_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/statuses/{sha}","languages_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/languages","stargazers_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/stargazers","contributors_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/contributors","subscribers_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/subscribers","subscription_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/subscription","commits_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/commits{/sha}","git_commits_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/git/commits{/sha}","comments_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/comments{/number}","issue_comment_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/issues/comments/{number}","contents_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/contents/{+path}","compare_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/merges","archive_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/downloads","issues_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/issues{/number}","pulls_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/pulls{/number}","milestones_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/milestones{/number}","notifications_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/labels{/name}","releases_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/releases{/id}","created_at":"2015-02-16T12:00:43Z","updated_at":"2015-02-17T18:17:31Z","pushed_at":"2015-02-17T18:17:31Z","git_url":"git://github.com/vert-x3/vertx-mail-service.git","ssh_url":"git@github.com:vert-x3/vertx-mail-service.git","clone_url":"https://github.com/vert-x3/vertx-mail-service.git","svn_url":"https://github.com/vert-x3/vertx-mail-service","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"initial-work"}},"base":{"label":"vert-x3:master","ref":"master","sha":"0030240c65c853c03ee2984fa87d60f7d85d9b23","user":{"login":"vert-x3","id":8124623,"avatar_url":"https://avatars.githubusercontent.com/u/8124623?v=3","gravatar_id":"","url":"https://api.github.com/users/vert-x3","html_url":"https://github.com/vert-x3","followers_url":"https://api.github.com/users/vert-x3/followers","following_url":"https://api.github.com/users/vert-x3/following{/other_user}","gists_url":"https://api.github.com/users/vert-x3/gists{/gist_id}","starred_url":"https://api.github.com/users/vert-x3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vert-x3/subscriptions","organizations_url":"https://api.github.com/users/vert-x3/orgs","repos_url":"https://api.github.com/users/vert-x3/repos","events_url":"https://api.github.com/users/vert-x3/events{/privacy}","received_events_url":"https://api.github.com/users/vert-x3/received_events","type":"Organization","site_admin":false},"repo":{"id":30866500,"name":"vertx-mail-service","full_name":"vert-x3/vertx-mail-service","owner":{"login":"vert-x3","id":8124623,"avatar_url":"https://avatars.githubusercontent.com/u/8124623?v=3","gravatar_id":"","url":"https://api.github.com/users/vert-x3","html_url":"https://github.com/vert-x3","followers_url":"https://api.github.com/users/vert-x3/followers","following_url":"https://api.github.com/users/vert-x3/following{/other_user}","gists_url":"https://api.github.com/users/vert-x3/gists{/gist_id}","starred_url":"https://api.github.com/users/vert-x3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vert-x3/subscriptions","organizations_url":"https://api.github.com/users/vert-x3/orgs","repos_url":"https://api.github.com/users/vert-x3/repos","events_url":"https://api.github.com/users/vert-x3/events{/privacy}","received_events_url":"https://api.github.com/users/vert-x3/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vert-x3/vertx-mail-service","description":"","fork":false,"url":"https://api.github.com/repos/vert-x3/vertx-mail-service","forks_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/forks","keys_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/teams","hooks_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/hooks","issue_events_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/issues/events{/number}","events_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/events","assignees_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/assignees{/user}","branches_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/branches{/branch}","tags_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/tags","blobs_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/git/refs{/sha}","trees_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/statuses/{sha}","languages_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/languages","stargazers_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/stargazers","contributors_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/contributors","subscribers_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/subscribers","subscription_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/subscription","commits_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/commits{/sha}","git_commits_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/git/commits{/sha}","comments_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/comments{/number}","issue_comment_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/issues/comments/{number}","contents_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/contents/{+path}","compare_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/merges","archive_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/downloads","issues_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/issues{/number}","pulls_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/pulls{/number}","milestones_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/milestones{/number}","notifications_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/labels{/name}","releases_url":"https://api.github.com/repos/vert-x3/vertx-mail-service/releases{/id}","created_at":"2015-02-16T12:00:43Z","updated_at":"2015-02-17T18:17:31Z","pushed_at":"2015-02-17T18:17:31Z","git_url":"git://github.com/vert-x3/vertx-mail-service.git","ssh_url":"git@github.com:vert-x3/vertx-mail-service.git","clone_url":"https://github.com/vert-x3/vertx-mail-service.git","svn_url":"https://github.com/vert-x3/vertx-mail-service","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"initial-work"}},"_links":{"self":{"href":"https://api.github.com/repos/vert-x3/vertx-mail-service/pulls/1"},"html":{"href":"https://github.com/vert-x3/vertx-mail-service/pull/1"},"issue":{"href":"https://api.github.com/repos/vert-x3/vertx-mail-service/issues/1"},"comments":{"href":"https://api.github.com/repos/vert-x3/vertx-mail-service/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/vert-x3/vertx-mail-service/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/vert-x3/vertx-mail-service/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/vert-x3/vertx-mail-service/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/vert-x3/vertx-mail-service/statuses/ba4a117b81ed30b9891030060c51bdcceac6a333"}}}}