MailCore / mailcore2

MailCore 2 provide a simple and asynchronous API to work with e-mail protocols IMAP, POP and SMTP. The API has been redesigned from ground up.
Other
2.59k stars 623 forks source link

[Qequstion] - In mailCore2, use the following code to access email 163,How to do in mailCore1.0? #1988

Closed Rain-dew closed 8 months ago

Rain-dew commented 8 months ago

I want to ask you a question In mailCore2, use the following code to access email 163, if you do not set it, you cannot log in

imapSession.clientIdentity.name = @"SecMail";
imapSession.clientIdentity.vendor = @"xxx";
ImapSession. ClientIdentity. Version = @ "1.0";

In mailCore1.0, it cannot be accessed and the error code is MAILIMAP_ERROR_SELECT Is this the same type of problem as mailCore2 not setting clientIdentity? How do I set up in mailCore1.0? Unfortunately, we're still using 1.0 Waiting for your reply thank you

Rain-dew commented 8 months ago

The following is an example of the Java code for 163 Mailbox company How do I complete it in mailCore1.0?

Properties props = new Properties(); 
props.setProperty("mail.store.protocol", "imap"); 
props.setProperty("mail.imap.host", "imap.163.com"); 
props.setProperty("mail.imap.port", "143"); 

HashMap IAM = new HashMap();
IAM.put("name","myname");      
IAM.put("version","1.0.0");      
IAM.put("vendor","myclient");      
IAM.put("support-email","testmail@test.com");  
Session session = Session.getInstance(props); 

IMAPStore store = (IMAPStore) session.getStore("imap");

store.connect("testmail@163.com", "password"); 
Rain-dew commented 8 months ago

I used the following code to complete the 163 mailbox login If anyone has a better idea, please tall me.

image