generaljavascript52
Multi-Provider Temp Mail Scraper & API Client
Unified temporary disposable email scraper & API client supporting 3 providers: InboxKitten (inboxkitten.com), Tmail Cloud (tmailcloud.my.id), and EmailQu (emailqu.com). Generate addresses, list domains, and check inboxes in real-time.
Vamz Spectre6 Nov 2026219 baris kode
Jalankan via Terminal / CLI:
# 1. Download file script
curl -sL "https://code.vamxapi.my.id/snippet/raw/tempmail-multi" -o tempmail-multi.js
# 2. Jalankan script
node tempmail-multi.js
tempmail-multi.js(219 lines)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
/**
* Multi-Provider Temporary Email Scraper & API Client
* Targets:
* 1. InboxKitten (inboxkitten.com)
* 2. Tmail Cloud (tmailcloud.my.id)
* 3. EmailQu (emailqu.com)
* Author: Vamz Spectre (VamxAPI)
*
* Usage CLI:
* curl -sL "https://code.vamxapi.my.id/snippet/raw/tempmail-multi" -o tempmail-multi.js
* node tempmail-multi.js inboxkitten list demo
* node tempmail-multi.js tmailcloud generate [username] [domain]
* node tempmail-multi.js tmailcloud inbox [email protected]
* node tempmail-multi.js emailqu domains
* node tempmail-multi.js emailqu random
* node tempmail-multi.js emailqu inbox [email protected]
*/
const HEADERS = {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36'
};
// ==================== 1. INBOXKITTEN ====================
class InboxKitten {
static BASE = 'https://inboxkitten.com/api/v1/mail';
static async list(recipient) {
const clean = (recipient || '').replace(/@.*$/, '').trim();
if (!clean) throw new Error('Recipient name is required (e.g. demo)');
const res = await fetch(`${this.BASE}/list?recipient=${encodeURIComponent(clean)}`, { headers: HEADERS });
if (!res.ok) throw new Error(`InboxKitten list failed: ${res.status}`);
const data = await res.json();
return {
status: true,
provider: 'inboxkitten.com',
recipient: `${clean}@inboxkitten.com`,
count: data.length,
messages: data.map(m => ({
id: m.id,
timestamp: m.timestamp ? new Date(m.timestamp * 1000).toISOString() : null,
sender: m.message?.headers?.from || m.envelope?.sender,
subject: m.message?.headers?.subject || '(No Subject)',
storage: m.storage
}))
};
}
static async getMessage(region, key) {
if (!region || !key) throw new Error('region and key are required');
const [metaRes, htmlRes] = await Promise.all([
fetch(`${this.BASE}/getKey?region=${encodeURIComponent(region)}&key=${encodeURIComponent(key)}`, { headers: HEADERS }),
fetch(`${this.BASE}/getHtml?region=${encodeURIComponent(region)}&key=${encodeURIComponent(key)}`, { headers: HEADERS })
]);
const meta = metaRes.ok ? await metaRes.json() : {};
const html = htmlRes.ok ? await htmlRes.text() : '';
return {
status: true,
provider: 'inboxkitten.com',
metadata: meta,
htmlBody: html
};
}
}
// ==================== 2. TMAILCLOUD ====================
class TmailCloud {
static BASE = 'https://tmailcloud.my.id/api';
static async getDomains() {
const res = await fetch(`${this.BASE}/domains`, { headers: HEADERS });
if (!res.ok) throw new Error(`TmailCloud domains failed: ${res.status}`);
const data = await res.json();
return {
status: true,
provider: 'tmailcloud.my.id',
domains: (data.domains || []).map(d => ({
id: d.id,
domain: d.name,
isActive: d.is_active,
isDefault: d.is_default
}))
};
}
static async generate(username = null, domain = 'tmailcloud.my.id') {
const payload = { domain };
if (username) payload.username = username;
const res = await fetch(`${this.BASE}/email/generate`, {
method: 'POST',
headers: { ...HEADERS, 'Content-Type': 'application/json' },
body: JSON.stringify(payload)
});
if (!res.ok) throw new Error(`TmailCloud generate failed: ${res.status}`);
const data = await res.json();
return {
status: true,
provider: 'tmailcloud.my.id',
email: data.email,
inbox: data.inbox
};
}
static async getInbox(address) {
if (!address) throw new Error('Email address is required');
const res = await fetch(`${this.BASE}/email/inbox/${encodeURIComponent(address)}`, { headers: HEADERS });
if (!res.ok) throw new Error(`TmailCloud inbox failed: ${res.status}`);
const data = await res.json();
return {
status: true,
provider: 'tmailcloud.my.id',
address: data.address,
total: data.total || 0,
messages: data.messages || []
};
}
}
// ==================== 3. EMAILQU ====================
class EmailQu {
static BASE = 'https://emailqu.com/api';
static async getDomains() {
const res = await fetch(`${this.BASE}/domains`, { headers: HEADERS });
if (!res.ok) throw new Error(`EmailQu domains failed: ${res.status}`);
const data = await res.json();
return {
status: true,
provider: 'emailqu.com',
total: data.domains?.length || 0,
domains: (data.domains || []).map(d => d.domain)
};
}
static async getRandomUsername() {
const res = await fetch(`${this.BASE}/random-username`, { headers: HEADERS });
if (!res.ok) throw new Error(`EmailQu random username failed: ${res.status}`);
const data = await res.json();
return {
status: true,
provider: 'emailqu.com',
username: data.username
};
}
static async getInbox(address) {
if (!address) throw new Error('Email address is required');
const res = await fetch(`${this.BASE}/public/emails/${encodeURIComponent(address)}`, { headers: HEADERS });
if (!res.ok) throw new Error(`EmailQu inbox failed: ${res.status}`);
const data = await res.json();
return {
status: true,
provider: 'emailqu.com',
address: data.address,
count: data.count || 0,
emails: data.emails || []
};
}
}
// ==================== CLI RUNNER ====================
if (require.main === module) {
const provider = (process.argv[2] || '').toLowerCase();
const action = (process.argv[3] || '').toLowerCase();
const arg1 = process.argv[4];
const arg2 = process.argv[5];
(async () => {
try {
let result;
if (provider === 'inboxkitten') {
if (action === 'get') {
result = await InboxKitten.getMessage(arg1, arg2);
} else {
result = await InboxKitten.list(arg1 || 'demo');
}
} else if (provider === 'tmailcloud') {
if (action === 'domains') {
result = await TmailCloud.getDomains();
} else if (action === 'generate') {
result = await TmailCloud.generate(arg1, arg2 || 'tmailcloud.my.id');
} else {
result = await TmailCloud.getInbox(arg1 || '[email protected]');
}
} else if (provider === 'emailqu') {
if (action === 'domains') {
result = await EmailQu.getDomains();
} else if (action === 'random') {
result = await EmailQu.getRandomUsername();
} else {
result = await EmailQu.getInbox(arg1 || '[email protected]');
}
} else {
result = {
status: false,
message: 'Unknown provider. Available: inboxkitten, tmailcloud, emailqu',
examples: [
'node tempmail-multi.js inboxkitten list demo',
'node tempmail-multi.js tmailcloud generate vamzdemo',
'node tempmail-multi.js tmailcloud inbox [email protected]',
'node tempmail-multi.js emailqu random',
'node tempmail-multi.js emailqu domains',
'node tempmail-multi.js emailqu inbox [email protected]'
]
};
}
console.log(JSON.stringify(result, null, 2));
} catch (err) {
console.error(JSON.stringify({ status: false, error: err.message }, null, 2));
process.exit(1);
}
})();
}
module.exports = {
InboxKitten,
TmailCloud,
EmailQu
};