Show pageOld revisionsBacklinksExport to PDFBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== Integrate SendGrid ====== ===== Reference ===== * [[howto:sendgrid:start|SendGrid]] ===== Step ===== * Add a new [[https://app.sendgrid.com/settings/sender_auth|Single Sender]] * Add a new [[https://app.sendgrid.com/settings/api_keys|API Keys]] * Read [[https://docs.sendgrid.com/api-reference/mail-send/mail-send|Send API]] * Stringify html content, reference [[zh:staff:mao_joe:use_dart_to_write_a_text_converter_app:start|Use dart to write a text converter app]] * Use postman to test <code> POST https://api.sendgrid.com/v3/mail/send request headers { Authorization: Bearer <API Key> } request body { "personalizations": [ { "to": [ { "email": "clutchjoe@outlook.com" } ] } ], "from": { "email": "joe.mao@gz.questwork.com" }, "subject": "Vue.js前端笔试题", "content": [ { "type": "text/html", "value": "<!DOCTYPE html>\n<html>\n<head>\n<meta charset=\"utf-8\">\n</head>\n<body>\n\t<div>同学你好,</div>\n\t<div><br>请打开以下链接,请仔细阅读题目要求并根据要求完成答题。</div>\n\t<div><br><a href=\"https://wiki.questwork.com/dokuwiki/doku.php?id=interview:developer:vue_developer:start\" target=\"_blank\">笔试题链接</a></div>\n\t<div><br>注意事项:</div>\n <ul>\n\t <li>请将相关答题附件发到邮箱 <b><i>herbin.xie@gz.questwork.com</i></b></li>\n\t <li>请务必在你的提交邮件中写上你的<b><i>名字,手机号码和Wechat</i></b>,否则答题将不予处理</li>\n\t <li>下一轮的面试会在收回答案并筛选后的1-2个工作日内通过电话或者WeChat进行</li>\n\t <li>若后续没收到我们的电话或者WeChat联系,即代表本次笔试没有通过</li>\n\t <li>如有什么问题可以通过招聘平台或者这个邮箱(<b><i>joe.mao@gz.questwork.com</i></b>)告知我们</li>\n\t</ul>\n\t<div></div>\n</body>\n</html>" } ], // for SendGrid filtering "categories": ["Frontend"], // schedule mail time "send_at": 1667197082 } </code> <note tip>If you need to test sending emails later, you can also use postman to perform an http network request as above.</note> ===== Check Schedule emails form SendGrid ===== * Open SendGrid Activity panel, [[https://app.sendgrid.com/email_activity|Link]] {{ :interview:interview_agenda:integrate_sendgrid:screen_shot_2022-11-02_at_00.48.47.png?1200 |}} interview/interview_agenda/integrate_sendgrid/start.txt Last modified: 2022/11/02 10:19by joe.mao