How to initiate an action from and email, through an Alexa Dot's smart light switch

Look at the posts marked Solution… there are also a few examples in the documents page I linked above.

If you still can’t solve your IMAP question, post a specific question.