Greetings, i am very much interested to know how to mark a email as spam. i have seen flags like Deleted", "Seen", "Answered", "Flagged", "Draft", and "Answered. But what about spam/junk? for example i like to check unread email in inbox and if it as some bad text then i like to mark that as spam/junk?
thanks in advance
asked Jan 18 '15 at 22:16
Shouldn't mail that is spam/junk be moved to the spam/junk folder? There are no standard IMAP flags for junk, although if Chilkat supports it you could add a custom /Junk flag, but this would also require the mail client to understand what to do with that flag - which would normally be to move the message to the spam/junk folder, so why not just move it there in your application anyway? The user can then clearly see it is spam due to the folder it is in, and they can then decide whether to delete it or to move it to the inbox or other folder if they want to keep it.
answered Jan 19 '15 at 02:52
Check out these 2 examples:
Copy a message from one box to another: http://www.example-code.com/vb/imap_CopyToMailbox.asp
Delete a message: http://www.example-code.com/vb/imap_DeleteEmail.asp
answered Jan 19 '15 at 11:48
The flagName argument in any of the methods for setting flags (such as SetFlag, SetFlags, SetMailFlag, etc.) can be anything. The name you'll need to use depends on what is expected by the software implementations (such as the IMAP server or an email client such as Thunderbird). Setting a flag doesn't move or delete an email.
answered Jan 19 '15 at 22:56
thanks a first reply, but i didn't ask for this post.. i this is less important..
i have asked for :
please try to help me on that :)
thanks again.. you always rocks on helps
answered Jan 19 '15 at 11:51