tags:

views:

51

answers:

1

I am using this library IMAPX to get emails.

I also need to send emails but cannot figure out how.

I tried using the example code:

client.Folders["INBOX"].AppendMessage(msg)

but receive an error that AppendMessage requires two arguments and I cannot figure out what the second argument should be.

Is it possible to send an email with this library and if so how?

+1  A: 

According to Reflector, it looks like the second parameter should be a string giving the flags for the new message; it looks like the ImapFlags class gives a list of available flags.

If you want more background in IMAP, then you should read its RFC.

However, the IMAP protocol is NOT used to send mail, it's used to read or retrieve mail that's in a mailbox on a server. You can use it to add messages to your own mailbox (as you're trying to do here), but that isn't what most people mean when they talk about sending email... SMTP is the standard way to send email.

Josh Kelley