Profile Picture

Using the COPY command

Posted By kdajani83 8 Years Ago
You don't have permission to rate!
Author
Message
kdajani83
Posted 8 Years Ago
View Quick Profile
Junior Member

Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)

Group: Forum Members
Last Active: 8 Years Ago
Posts: 2, Visits: 2
Hi,



I am using iMail v10.2. After reading the API, it was my understanding that if I send the COPY command from the Imap4Client class, it would a copy a message from one mailbox to another. However I don't think I am using it right.



What I am trying to achieve is Copy a message from the INBOX folder to a folder called PROCESSED. I've made sure to create the folder as well. What should the correct code be?



As of now I do





Imap4Client client = BeginSession(username, password);



// Send SELECT to select the folder

client.Select(folder);

if (client.CommandStatus != Imap4StatusCode.Ok)

{

// if it does not exist create it

client.Create(folder);



// Send SELECT to select the folder

client.Select(folder);

if (client.CommandStatus != Imap4StatusCode.Ok)

{

EndSession(client);

} // end if



} // end if



// add message to mail folder

client.Copy(msgNum, folder);



EndSession(client);







Begin/End Session does the necessary connection and clean up.



Thanks for your help
kdajani83
Posted 8 Years Ago
View Quick Profile
Junior Member

Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)

Group: Forum Members
Last Active: 8 Years Ago
Posts: 2, Visits: 2
Nevermind. I've solved it. I have to select the Inbox, then issue the copy command.


Similar Topics


Reading This Topic