Archived Forum PostQuestion:
I am trying to use the email library for android. I have written a simple code as follows:
CkImap imap = new CkImap();
boolean success;
// Anything unlocks the component and begins a fully-functional 30-day
// trial.
success = imap.UnlockComponent("Anything for 30-day trial");
if (success != true) {
Log.i(TAG, imap.lastErrorText());
return;
}
// Connect to an IMAP server.
success = imap.Connect("imap.gmail.com");
if (success != true) {
Log.i(TAG, imap.lastErrorText());
return;
} ....
However it is returning from this point itself. The last error text displayed is:-
ChilkatLog:
Connect_Imap:
DllDate: Apr 22 2014
ChilkatVersion: 9.5.0.33
UnlockPrefix: Anything for 30-day trial
Architecture: Little Endian; 32-bit
Language: Android Java
VerboseLogging: 0
GMail does not allow unencrypted connections, auto-fixing to use TLS/SSL...
To prevent auto-fix, set the AutoFix property = False/0
hostname: imap.gmail.com
port: 993
connect2:
connectImplicitSsl:
connectSocket:
connect_ipv6_or_ipv4:
getAddressInfo:
Failed to get host address info. (4)
errno: 13
osErrorMessage: Permission denied
hostOrIpAddr: imap.gmail.com
port: 993
--getAddressInfo
getAddressInfo failed.
--connect_ipv6_or_ipv4
--connectSocket
--connectImplicitSsl
ConnectFailReason: DNS lookup failed
--connect2
failReason: 2
connect failed.
--Connect_Imap
--ChilkatLog
I am getting this error even when I try to send email using SMTP.
Any help will be appreciated
Thanks.
See this: http://www.cknotes.com/android-socket-permission-denied-error/
(I found it by Googling "chilkat android permission denied" -- http://bit.ly/1s8zkO4 )