login about faq

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

best regards

asked Jan 18 '15 at 22:16

mAlam's gravatar image


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

AgeofStrife's gravatar image


thanks for your rely, then how to move to junk/spam folder?

(Jan 19 '15 at 03:57) mAlam

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

jpbro's gravatar image

jpbro ♦

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

chilkat's gravatar image

chilkat ♦♦

thanks for that explanation..

(Jan 19 '15 at 23:24) mAlam

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

mAlam's gravatar image


Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Jan 18 '15 at 22:16

Seen: 784 times

Last updated: Jan 20 '15 at 09:20

powered by OSQA