postalsys / mailauth

Command line utility and a Node.js library for email authentication
Other
126 stars 10 forks source link

Extracted get-dmarc-record into separate function #28

Closed andris9 closed 1 year ago

andris9 commented 1 year ago

Extracted getDmarcRecord into separate file

External usage

const getDmarcRecord = require('mailauth/lib/dmarc/get-dmarc-record');
const dmarcRecord = getDmarcRecord("ethereal.email");
console.log(dmarcRecord);

Output

{
  v: 'DMARC1',
  p: 'none',
  pct: 100,
  rua: 'mailto:re+joqy8fpatm3@dmarc.postmarkapp.com',
  sp: 'none',
  aspf: 'r',
  rr: 'v=DMARC1; p=none; pct=100; rua=mailto:re+joqy8fpatm3@dmarc.postmarkapp.com; sp=none; aspf=r;',
  isOrgRecord: false
}