Test environment nhyehyɛeɛ
Anammɔn a edi kan de email verification tests yɛ automatic no ne sɛ wobɛhyehyɛ test environment pa. Nea wohia: API key, test framework (sɛ pytest anaa Jest), ne ɔkwan a wubɛfa so akɔ wo CI/CD system mu. Wo test environment no ne wo production environment no nsɛ.
API dwumadi
EvilMail API so no, wubɛtumi de program ayɛ email addresses foforɔ. Nea edi kan fa wo API key, afei send request te sɛ eyi:
curl -X POST https://api.evilmail.com/v1/inboxes
-H "Authorization: Bearer YOUR_API_KEY"
-H "Content-Type: application/json"Eyi bɛma wo throwaway email address a ɛyɛ soronko.
Inbox hwɛhwɛ
Sɛ wɔde email no kɔ wie a, fa polling mechanism hwɛ inbox no. Send requests kɔ API no bere biara mu na hwɛ sɛ message foforɔ aba anaa.
curl https://api.evilmail.com/v1/inboxes/{inbox_id}/messages
-H "Authorization: Bearer YOUR_API_KEY"
