Closed Premasanthakumar closed 6 years ago
Hello @Premasanthakumar,
It looks like this call is working as expected. I'm not sure what you are expecting. Could you please let me know what you expect to be returned by that API call?
Thanks!
With Best Regards,
Elmer
import com.sendgrid.*; import java.io.IOException; import com.sendgrid.Content; import com.sendgrid.Email; import com.sendgrid.Mail; import com.sendgrid.Method; import com.sendgrid.Request; import com.sendgrid.Response; import com.sendgrid.SendGrid; import java.io.IOException;
public class SendEmail { public static void main(String[] args) throws IOException { Email from = new Email("prema17kumar@gmail.com"); String subject = "Hello World from the SendGrid Java Library!";
} }
OUTPUT: 200 {"id":"337776bb-16b8-4a6e-b8f1-eb24fdecc8a8","name":"KYC-Submit-1","generation":"legacy","versions":[{"id":"8a6dc18d-0ccf-4fe4-8b2b-3192ebdcbabe","user_id":7825087,"template_id":"337776bb-16b8-4a6e-b8f1-eb24fdecc8a8","active":1,"name":"Untitled_11529983864866","html_content":"\u003c!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\"\u003e\n\u003chtml data-editor-version=\"2\" class=\"sg-campaigns\" xmlns=\"http://www.w3.org/1999/xhtml\"\u003e\n \u003chead\u003e\n \u003cmeta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" /\u003e\n \u003cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1\" /\u003e\u003c!--[if !mso]\u003e\u003c!--\u003e\n \u003cmeta http-equiv=\"X-UA-Compatible\" content=\"IE=Edge\" /\u003e\u003c!--\u003c![endif]--\u003e\n \u003c!--[if (gte mso 9)|(IE)]\u003e\n \u003cxml\u003e\n \u003co:OfficeDocumentSettings\u003e\n \u003co:AllowPNG/\u003e\n \u003co:PixelsPerInch\u003e96\u003c/o:PixelsPerInch\u003e\n \u003c/o:OfficeDocumentSettings\u003e\n \u003c/xml\u003e\n \u003c![endif]--\u003e\n \u003c!--[if (gte mso 9)|(IE)]\u003e\n \u003cstyle type=\"text/css\"\u003e\n body {width: 600px;margin: 0 auto;}\n table {border-collapse: collapse;}\n table, td {mso-table-lspace: 0pt;mso-table-rspace: 0pt;}\n img {-ms-interpolation-mode: bicubic;}\n \u003c/style\u003e\n \u003c![endif]--\u003e\n\n \u003cstyle type=\"text/css\"\u003e\n body, p, div {\n font-family: arial;\n font-size: 18px;\n }\n body {\n color: #4b4b4b;\n }\n body a {\n color: #1188E6;\n text-decoration: none;\n }\n p { margin: 0; padding: 0; }\n table.wrapper {\n width:100% !important;\n table-layout: fixed;\n -webkit-font-smoothing: antialiased;\n -webkit-text-size-adjust: 100%;\n -moz-text-size-adjust: 100%;\n -ms-text-size-adjust: 100%;\n }\n img.max-width {\n max-width: 100% !important;\n }\n .column.of-2 {\n width: 50%;\n }\n .column.of-3 {\n width: 33.333%;\n }\n .column.of-4 {\n width: 25%;\n }\n @media screen and (max-width:480px) {\n .preheader .rightColumnContent,\n .footer .rightColumnContent {\n text-align: left !important;\n }\n .preheader .rightColumnContent div,\n .preheader .rightColumnContent span,\n .footer .rightColumnContent div,\n .footer .rightColumnContent span {\n text-align: left !important;\n }\n .preheader .rightColumnContent,\n .preheader .leftColumnContent {\n font-size: 80% !important;\n padding: 5px 0;\n }\n table.wrapper-mobile {\n width: 100% !important;\n table-layout: fixed;\n }\n img.max-width {\n height: auto !important;\n max-width: 480px !important;\n }\n a.bulletproof-button {\n display: block !important;\n width: auto !important;\n font-size: 80%;\n padding-left: 0 !important;\n padding-right: 0 !important;\n }\n .columns {\n width: 100% !important;\n }\n .column {\n display: block !important;\n width: 100% !important;\n padding-left: 0 !important;\n padding-right: 0 !important;\n margin-left: 0 !important;\n margin-right: 0 !important;\n }\n }\n \u003c/style\u003e\n \u003c!--user entered Head Start--\u003e\n \u003cstyle\u003e\n\n.please\n {\n font-color:white;\n }\n\n\u003c/style\u003e\n \u003c!--End Head user entered--\u003e\n \u003c/head\u003e\n \u003cbody\u003e\n \u003ccenter class=\"wrapper\" data-link-color=\"#1188E6\" data-body-style=\"font-size: 18px; font-family: arial; color: #4b4b4b; background-color: #eeeeee;\"\u003e\n \u003cdiv class=\"webkit\"\u003e\n \u003ctable cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\" class=\"wrapper\" bgcolor=\"#eeeeee\"\u003e\n \u003ctr\u003e\n \u003ctd valign=\"top\" bgcolor=\"#eeeeee\" width=\"100%\"\u003e\n \u003ctable width=\"100%\" role=\"content-container\" class=\"outer\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"\u003e\n \u003ctr\u003e\n \u003ctd width=\"100%\"\u003e\n \u003ctable width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"\u003e\n \u003ctr\u003e\n \u003ctd\u003e\n \u003c!--[if mso]\u003e\n \u003ccenter\u003e\n \u003ctable\u003e\u003ctr\u003e\u003ctd width=\"600\"\u003e\n \u003c![endif]--\u003e\n \u003ctable width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"width: 100%; max-width:600px;\" align=\"center\"\u003e\n \u003ctr\u003e\n \u003ctd role=\"modules-container\" style=\"padding: 0px 0px 0px 0px; color: #4b4b4b; text-align: left;\" bgcolor=\"#ffffff\" width=\"100%\" align=\"left\"\u003e\n \n \u003ctable class=\"module preheader preheader-hide\" role=\"module\" data-type=\"preheader\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"\n style=\"display: none !important; mso-hide: all; visibility: hidden; opacity: 0; color: transparent; height: 0; width: 0;\"\u003e\n \u003ctr\u003e\n \u003ctd role=\"module-content\"\u003e\n \u003cp\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003c/table\u003e\n \n \u003ctable class=\"wrapper\" role=\"module\" data-type=\"image\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" style=\"table-layout: fixed;\"\u003e\n \u003ctr\u003e\n \u003ctd style=\"font-size:6px;line-height:10px;padding:0px 0px 0px 0px;\" valign=\"top\" align=\"center\"\u003e\n \u003cimg class=\"max-width\" style=\"display:block;color:#000000;text-decoration:none;font-family:Helvetica, arial, sans-serif;font-size:16px;max-width:100% !important;width:100%;height:auto !important;\" src=\"https://marketing-image-production.s3.amazonaws.com/uploads/5bbebc59985009a4959df9d07c6900b044cd3f51cec87c5df0aea16de930f811d87e6656d885fb1764afb2f385f2a4402cc7f43931b72cc8bde6f594348b15b6.png\" alt=\"\" width=\"600\" border=\"0\"\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003c/table\u003e\n \n \u003ctable class=\"module\" role=\"module\" data-type=\"text\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" style=\"table-layout: fixed;\"\u003e\n \u003ctr\u003e\n \u003ctd style=\"background-color:#f7931e;padding:18px 0px 18px 040px;line-height:22px;text-align:inherit;\"\n height=\"100%\"\n valign=\"top\"\n bgcolor=\"#f7931e\"\u003e\n \u003cdiv style=\"color: #ffffff; font-size:20px\"\u003ePlease submit KYC documents - spark\u003c/div\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003c/table\u003e\n \n \u003ctable class=\"module\" role=\"module\" data-type=\"text\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" style=\"table-layout: fixed;\"\u003e\n \u003ctr\u003e\n \u003ctd style=\"padding:15px 020px 18px 40px;line-height:20px;text-align:justify;\"\n height=\"100%\"\n valign=\"top\"\n bgcolor=\"\"\u003e\n \u003cdiv\u003eDear (CUSTOMER-NAME),\u003c/div\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003c/table\u003e\n \n \u003ctable class=\"module\" role=\"module\" data-type=\"text\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" style=\"table-layout: fixed;\"\u003e\n \u003ctr\u003e\n \u003ctd style=\"padding:02px 020px 18px 40px;line-height:20px;text-align:justify;\"\n height=\"100%\"\n valign=\"top\"\n bgcolor=\"\"\u003e\n \u003cdiv\u003eIt is mandatory to upload KYC documents to continue availing service for your Spark Savings Account from Ayshwarya Syndicate. This is done to ensure compliance as per regulatory guidelines and also to protect your accounts.\u003c/div\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003c/table\u003e\n \n \u003ctable class=\"wrapper\" role=\"module\" data-type=\"image\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" style=\"table-layout: fixed;\"\u003e\n \u003ctr\u003e\n \u003ctd style=\"font-size:6px;line-height:10px;padding:0px 0px 0px 0px;\" valign=\"top\" align=\"center\"\u003e\n \u003cimg class=\"max-width\" style=\"display:block;color:#000000;text-decoration:none;font-family:Helvetica, arial, sans-serif;font-size:16px;max-width:100% !important;width:100%;height:auto !important;\" src=\"https://marketing-image-production.s3.amazonaws.com/uploads/a54a24782e83b917ddd8261cd30fd7d02b83e74f05c90ce11b9ceacbb4b51d5e28c5458bd621c95617b0a841f8b9c2ef80da84186b01e14d23196e231816f69d.jpg\" alt=\"\" width=\"600\" border=\"0\"\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003c/table\u003e\n \n \u003ctable class=\"module\" role=\"module\" data-type=\"text\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" style=\"table-layout: fixed;\"\u003e\n \u003ctr\u003e\n \u003ctd style=\"padding:15px 020px 18px 40px;line-height:20px;text-align:justify;\"\n height=\"100%\"\n valign=\"top\"\n bgcolor=\"\"\u003e\n \u003cdiv\u003eOur KYC requirements are simple, and everything can be done right from the Spark app! Go to Settings in the Spark app where you can upload KYC documents easily.\u003c/div\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003c/table\u003e\n \n \u003ctable class=\"module\" role=\"module\" data-type=\"text\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" style=\"table-layout: fixed;\"\u003e\n \u003ctr\u003e\n \u003ctd style=\"padding:18px 0px 18px 40px;line-height:22px;text-align:inherit;\"\n height=\"100%\"\n valign=\"top\"\n bgcolor=\"\"\u003e\n \u003cdiv style=\"color:#F7931E; font-size:20px\"\u003eThe KYC documents we need are:\u003c/div\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003c/table\u003e\n \n \u003ctable class=\"module\" role=\"module\" data-type=\"text\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" style=\"table-layout: fixed;\"\u003e\n \u003ctr\u003e\n \u003ctd style=\"padding:010px 020px 18px 40px;line-height:20px;text-align:justify;\"\n height=\"100%\"\n valign=\"top\"\n bgcolor=\"\"\u003e\n \u003cdiv\u003e- Your own Photograph\u003c/div\u003e\n\n\u003cdiv\u003e- A photo of your original PAN card\u003c/div\u003e\n\n\u003cdiv\u003e- A photo of your original Aadhaar card\u003c/div\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003c/table\u003e\n \n \u003ctable class=\"module\" role=\"module\" data-type=\"text\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" style=\"table-layout: fixed;\"\u003e\n \u003ctr\u003e\n \u003ctd style=\"padding:02px 020px 18px 40px;line-height:20px;text-align:justify;\"\n height=\"100%\"\n valign=\"top\"\n bgcolor=\"\"\u003e\n \u003cdiv style=\"font-size:16px;\"\u003eNote: If we find issues with your KYC documents, you can resubmit them easily using the Spark app. KYC verification can be attempted up to 3 times after which your account may get locked.\u003c/div\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003c/table\u003e\n \n \u003ctable class=\"module\" role=\"module\" data-type=\"text\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" style=\"table-layout: fixed;\"\u003e\n \u003ctr\u003e\n \u003ctd style=\"padding:18px 020px 18px 40px;line-height:20px;text-align:justify;\"\n height=\"100%\"\n valign=\"top\"\n bgcolor=\"\"\u003e\n \u003cdiv\u003eThank you,\u003c/div\u003e\n\n\u003cdiv\u003e\u0026nbsp;\u003c/div\u003e\n\n\u003cdiv\u003eSpark team\u003c/div\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003c/table\u003e\n \n \u003ctable class=\"module\" role=\"module\" data-type=\"text\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" style=\"table-layout: fixed;\"\u003e\n \u003ctr\u003e\n \u003ctd style=\"background-color:#f7931e;padding:15px 0px 15px 0px;line-height:27px;text-align:inherit;\"\n height=\"100%\"\n valign=\"top\"\n bgcolor=\"#f7931e\"\u003e\n \u003cdiv style=\"text-align: center; color:#ffffff;\"\u003eAyshwarya Syndicate\u003c/div\u003e\n\n\u003cdiv style=\"text-align: center; color:#ffffff;\"\u003ewww.assccl.com\u003c/div\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003c/table\u003e\n \n \u003c/td\u003e\n \u003c/tr\u003e\n \u003c/table\u003e\n \u003c!--[if mso]\u003e\n \u003c/td\u003e\u003c/tr\u003e\u003c/table\u003e\n \u003c/center\u003e\n \u003c![endif]--\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003c/table\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003c/table\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003c/table\u003e\n \u003c/div\u003e\n \u003c/center\u003e\n \u003c/body\u003e\n\u003c/html\u003e","plain_content":"Please submit KYC documents - spark\n\nDear (CUSTOMER-NAME),\n\nIt is mandatory to upload KYC documents to continue availing service for your Spark Savings Account from Ayshwarya Syndicate. This is done to ensure compliance as per regulatory guidelines and also to protect your accounts.\n\nOur KYC requirements are simple, and everything can be done right from the Spark app! Go to Settings in the Spark app where you can upload KYC documents easily.\n\nThe KYC documents we need are:\n\n- Your own Photograph\n\n- A photo of your original PAN card\n\n- A photo of your original Aadhaar card\n\nNote: If we find issues with your KYC documents, you can resubmit them easily using the Spark app. KYC verification can be attempted up to 3 times after which your account may get locked.\n\nThank you,\n\nSpark team\n\nAyshwarya Syndicate\n\nwww.assccl.com","subject":"\u003c%subject%\u003e","updated_at":"2018-06-26 03:32:14","editor":"code"}]} {Transfer-Encoding=chunked, Server=nginx, Access-Control-Allow-Origin=*, X-Ratelimit-Remaining=599, Access-Control-Allow-Methods=HEAD, GET, PATCH, PUT, POST, OPTIONS, DELETE, X-Content-Type-Options=nosniff, Powered-By=Mako, Connection=keep-alive, Date=Fri, 13 Jul 2018 07:03:55 GMT, Access-Control-Allow-Headers=AUTHORIZATION, Content-Type, On-behalf-of, x-sg-elas-acl, X-Recaptcha, X-Ratelimit-Reset=1531465440, X-Ratelimit-Limit=600, Access-Control-Expose-Headers=Link, Location, Strict-Transport-Security=max-age=31536000, Content-Security-Policy=default-src https://api.sendgrid.com; frame-src 'none'; object-src 'none', Access-Control-Max-Age=21600, Content-Type=application/json}