generaljavascript51
Tmail Cloud - Permanent Disposable Email Scraper
API client for tmailcloud.my.id temporary email service without expiration. Generates custom/random addresses and fetches incoming messages.
Vamz Spectre6 Nov 2026101 baris kode
Jalankan via Terminal / CLI:
# 1. Download file script
curl -sL "https://code.vamxapi.my.id/snippet/raw/tmailcloud" -o tmailcloud.js
# 2. Jalankan script
node tmailcloud.js
tmailcloud.js(101 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
/**
* Tmail Cloud Temporary Email Scraper & Generator
* Author: Vamz Spectre (VamxAPI)
* Target: https://tmailcloud.my.id
* Description:
* API client for Tmail Cloud (temp mail without expiration).
* Generate custom/random email addresses and fetch incoming messages.
*
* Usage CLI:
* curl -sL "https://code.vamxapi.my.id/snippet/raw/tmailcloud" -o tmailcloud.js
* node tmailcloud.js domains
* node tmailcloud.js generate [username] [domain]
* node tmailcloud.js 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'
};
const BASE = 'https://tmailcloud.my.id/api';
async function getDomains() {
const res = await fetch(`${BASE}/domains`, { headers: HEADERS });
if (!res.ok) throw new Error(`TmailCloud domains failed: ${res.status}`);
const data = await res.json();
return {
status: true,
author: 'Vamz Spectre',
provider: 'tmailcloud.my.id',
domains: (data.domains || []).map(d => ({
id: d.id,
domain: d.name,
isActive: d.is_active,
isDefault: d.is_default
}))
};
}
async function generateEmail(username = null, domain = 'tmailcloud.my.id') {
const payload = { domain };
if (username) payload.username = username;
const res = await fetch(`${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,
author: 'Vamz Spectre',
provider: 'tmailcloud.my.id',
email: data.email,
inbox: data.inbox
};
}
async function getInbox(address) {
if (!address) throw new Error('Email address is required');
const res = await fetch(`${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,
author: 'Vamz Spectre',
provider: 'tmailcloud.my.id',
address: data.address,
total: data.total || 0,
messages: data.messages || []
};
}
// CLI Runner
if (require.main === module) {
const action = (process.argv[2] || 'inbox').toLowerCase();
const arg1 = process.argv[3];
const arg2 = process.argv[4];
(async () => {
try {
let result;
if (action === 'domains') {
result = await getDomains();
} else if (action === 'generate') {
result = await generateEmail(arg1, arg2);
} else {
result = await getInbox(arg1 || '[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 = {
getDomains,
generateEmail,
getInbox
};