syntax = "proto3"; package email; option go_package = "./proto;email"; service Email { rpc Send(SendRequest) returns (SendResponse) {} rpc Parse(ParseRequest) returns (ParseResponse) {} rpc Validate(ValidateRequest) returns (ValidateResponse) {} } // Send an email by passing in from, to, subject, and a text or html body message SendRequest { // the display name of the sender string from = 1; // the email address of the recipient string to = 2; // an optional reply to email address string reply_to = 3; // the email subject string subject = 4; // the text body string text_body = 5; // the html body string html_body = 6; } message SendResponse { } // Parse an RFC5322 address e.g "Joe Blogs " message ParseRequest { // The address to parse. Can be of the format "Joe Blogs " or "joe@example.com" string address = 1; } message ParseResponse { // associated name e.g Joe Blogs string name = 1; // the email address string address = 2; } // Validate an email address format message ValidateRequest { string address = 1; } message ValidateResponse { bool is_valid = 1; }