Skip to content

fzrilsh/onesecmail-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

onesecmail-api

Wrapper for 1secmail.com

Table of Contents

Usage

For Node.js

Install using:

npm install onesecmail-api --save

WARNING

this module require nodejs ver ^18.7.0

const onesecmailApi = require('onesecmail-api');

(async () => {
    const { mail, event } = await onesecmailApi()
    console.log(mail)
    event.on('newMsg', console.log)
})()

//Event response ->
{
    id: 10561939,
    sender: 'fazriloke18@gmail.com',
    subject: 'Hello World',
    date: '2023-04-30T04:16:42.000Z',
    msgBody: '<div dir="ltr">Whats up... NodeJS</div>\n',
    msgText: 'Whats up... NodeJS\n',
    attachments: [
        {
            fileName: 'Vector.png',
            fileSize: 207,
            fileContentType: 'image/png',
            fileUrl: 'https://www.1secmail.com/api/v1/?action=download&login=undefined&domain=undefined&id=10561939&file=Vector.png'
        }
    ]
}

About

Wrapper for 1secmail.com

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published