I am trying to use python's imaplib to create an email and send it to a mailbox with specific name, e.g. INBOX. Anyone has some great suggestion :).
The IMAP protocol is not designed to send emails. It is designed to manipulate mailboxes.
To create an email and send it you can use SMTP, as in smtplib.
To move an email that is already in a mailbox from one folder to another, you can copy the mail to the needed folder and delete it from the old one using uid
, as in the answer here.