Example with Mailinator



Last updated



Last updated
https://api.mailinator.com/api/inbox?token={{ env( "EID_SECRET" ) }}&to={{ TEST_USER_ALIAS }}async ( url ) => {
const inbox = await ( await fetch( url ) ).json(),
msgHead = inbox.messages
.reverse()
.find( msg => msg.subject.includes( "Account Validation" ) ),
fulMsg = await ( await fetch( `https://api.mailinator.com/api/message?token=YourAPIToken&id=${ msgHead.id }` ) ).json();
return fulMsg.data.parts.map( p => p.body ).join();
}( text ) => {
const re = /(http\:[^\"]+4567\/con[^\"]+)/g,
res = text.match( re );
return res ? res[ 0 ].replace( "=\r\n", "" ) : null;
}