title: Getting the information of an email with RobotFramework
body: <p>I am using Robot-framework with the selenium2library for testing some web-application. The script log in and send an activation URL to some email. I use the ImapLibrary to catch the mail and read it out but I get following error.</p>
  
  <p>FAIL : LookupError: unknown encoding: text/html</p>
  
  <p>Can somebody help me out.</p>
  
  <p>Following is the script I use</p>
  
  <pre><code>*** Settings ***
  Library    ImapLibrary
  
  *** Test Cases ***
  Email Verification
      Open Mailbox    host=imap.domain.com    user=email@domain.com    password=secret
      ${LATEST} =    Wait For Email    sender=noreply@domain.com    timeout=300
      ${HTML} =    Open Link From Email    ${LATEST}
      Should Contain    ${HTML}    Your email address has been updated
      Close Mailbox
  
  Multipart Email Verification
      Open Mailbox    host=imap.domain.com    user=email@domain.com    password=secret
      ${LATEST} =    Wait For Email    sender=noreply@domain.com    timeout=300
      ${parts} =    Walk Multipart Email    ${LATEST}
      :FOR    ${i}    IN RANGE    ${parts}
      \\    Walk Multipart Email    ${LATEST}
      \\    ${content-type} =    Get Multipart Content Type
      \\    Continue For Loop If    '${content-type}' != 'text/html'
      \\    ${payload} =    Get Multipart Payload    decode=True
      \\    Should Contain    ${payload}    your email
      \\    ${HTML} =    Open Link From Email    ${LATEST}
      \\    Should Contain    ${HTML}    Your email
      Close Mailbox
  </code></pre>