React Native
React Native
Yahoo! IMAP (imap.mail.yahoo.com)
(from Wikipedia)It is possible to get direct IMAP access without signing up for paid access nor using software like YPOPs! or FreePOPs. Yahoo! operates IMAP and secure IMAP servers (imap.mail.yahoo.com in particular), which are globally accessible. However they require a specific, non-standard IMAP command to be sent before login is done, namely: “ID ("GUID" "1")”.This example demonstrates sending the non-standard IMAP command after connecting but before login.
Chilkat React Native Downloads
import { Imap } from '@chilkat/react-native'
async function chilkatExample() {
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
const imap = new Imap();
// Connect to they Yahoo! IMAP server.
imap.port = 993;
imap.ssl = true;
try {
await imap.connectAsync('imap.mail.yahoo.com');
} catch {
console.log(imap.lastErrorText);
return;
}
// Send the non-standard ID command...
let rawResponse = '';
try {
rawResponse = await imap.sendRawCommandAsync('ID ("GUID" "1")');
} catch {
console.log(imap.lastErrorText);
return;
}
// Login
try {
await imap.loginAsync('myLogin', 'myPassword');
} catch {
console.log(imap.lastErrorText);
return;
}
console.log('Login Success!');
// Select an IMAP mailbox
try {
await imap.selectMailboxAsync('Inbox');
} catch {
console.log(imap.lastErrorText);
return;
}
// Continue with whatever you wish to do...
// (see other examples..)
// Disconnect from the IMAP server.
await imap.disconnectAsync();
}