1syntax = "proto2"; 2option go_package = "mail"; 3 4package appengine; 5 6message MailServiceError { 7 enum ErrorCode { 8 OK = 0; 9 INTERNAL_ERROR = 1; 10 BAD_REQUEST = 2; 11 UNAUTHORIZED_SENDER = 3; 12 INVALID_ATTACHMENT_TYPE = 4; 13 INVALID_HEADER_NAME = 5; 14 INVALID_CONTENT_ID = 6; 15 } 16} 17 18message MailAttachment { 19 required string FileName = 1; 20 required bytes Data = 2; 21 optional string ContentID = 3; 22} 23 24message MailHeader { 25 required string name = 1; 26 required string value = 2; 27} 28 29message MailMessage { 30 required string Sender = 1; 31 optional string ReplyTo = 2; 32 33 repeated string To = 3; 34 repeated string Cc = 4; 35 repeated string Bcc = 5; 36 37 required string Subject = 6; 38 39 optional string TextBody = 7; 40 optional string HtmlBody = 8; 41 42 repeated MailAttachment Attachment = 9; 43 44 repeated MailHeader Header = 10; 45} 46