Giter VIP home page Giter VIP logo

robotframework-imaplibrary's People

Contributors

burnes avatar chrishirsch avatar davidsoff avatar fkberthold avatar jodok avatar jukart avatar martinhill avatar peritus avatar quodt avatar rickypc avatar schwendinger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

robotframework-imaplibrary's Issues

decode('quoted-printable') Causes UUIDs in email body to deserialize incorrectly

When calling Get Email Body I expect it to return the body of the email as can be seen in the original email source. However, due to the call decode('quoted-printable') I get back a corrupted UUID and parameter. In the included case below, the parameter userIds operator = has been replaced with ! and some of the beginning characters of the UUID have been truncated causing the test to fail.

Simply removing the decode('quoted-printable') causes the userId parameter and UUID to be parsed as expected, and the test to pass successfully. Raising the question what is the reasoning behind decode('quoted-printable')?

What I get back when calling Get Email Body ${latest}

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
	<body>
		<span><a href="duesday://verify/me/email?code=12345&userId!f95bac-0c3e-4dbc-8153-70e297a81f7f">Confirm email address</a></span>
	</body>
</html>

What I expect when calling Get Email Body ${latest}

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
	<body>
		<span><a href="duesday://verify/me/email?code=12345&userId=21f95bac-0c3e-4dbc-8153-70e297a81f7f">Confirm email address</a></span>
	</body>
</html>

Unable to "wait for email" with a subject in unicode characters

Trying to look for emails with specific subjects that can be sent in multiple languages I ran into this issue. This is being sent to a gmail account. It seems after some digging that gmail encodes the subject into utf-8 and then into base64. I have been somewhat successful in manually decoding back to readable text.
2018-03-07 12_57_30-login-everywhere test log

Adding amount of active connections

in our automation we have multiple jobs use same email in the same time. Do you thing we can add function to retrieve the amount of active connections?

Get Email Body decodes URLs with issues

URLs are decoded with issues, for instance URL

<a href="https://example.com/verify-account?uid=5dd50bc5d3b1f228474551d7&t=98e1ee0c-a159-475e-a0e3-f74a533d48c8">

is decoded as

<a href="https://example.com/verify-account?uid]d50bc5d3b1f228474551d7&t�e1ee0c-a159-475e-a0e3-f74a533d48c8">

Here is Python code of function get_email_body():

        if self._is_walking_multipart(email_index):
            body = self.get_multipart_payload(decode=True)
        else:
            encoded_body = self._imap.uid('fetch', email_index, '(BODY[TEXT])')[1][0][1]
            try:
                body = decode(encoded_body, 'quopri_codec').decode('UTF-8')
            except:
                body = decode(encoded_body, 'quopri_codec').decode('ISO-8859-1')
        return body

Open Mailbox is not working keyword

. I keep get an error “ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it” .

My code is given below
Open Mailbox host=outlook.office365.com user=t********@outlook.com password=******* port=993

Looks that `Delete All Emails` keyword does not work straight away

If there is something in the mailbox, calling Delete All Emails soon after Open Mailbox keyword does not seem to do anything (calling Wait For Email after returns me emails straight away). It works though if I Delete All Emails and Close mailbox in the test teardown. I was trying to solve this issue with:

Open Mailbox
Delete All Emails
Close mailbox
Open Mailbox

but it looks the emails are still there :( Is there any lag/cached test data that may cause invalid state?

Issue with open link from google mail box

Trying to open link from email - it could not find any links from mail because of links and special characters are on utf8 mode:
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
and example how part of message is shown on log.
sms: Teid\xc3\xa4t xx xxxxxxxxx. Xxxxxx l\xc3\xb6yd\xc3\xa4...

New keyword: Download file from attachment

Hi,
At first I want to say thank you for your job and for your library! it's very useful

And I want to suggest you to add new keyword which would download the file from mail's attachment.

Walk Multipart Email: initial_value must be str or None, not bytes

Walk Multipart Email is failing with error:

TypeError: initial_value must be str or None, not bytes

Wait For Email is returning index as bytes but converting the index into string doesn't help.

    ${latest}=    Wait For Email    subject=Welcome!    timeout=60
    ${type}=    Evaluate    type($latest)    
    ${latest_str}=    Convert To String    ${latest}
    ${type}=    Evaluate    type($latest_str)    
    ${parts}=    Walk Multipart Email    ${latest_str}
20191121 10:17:59.267 : INFO : ${latest} = 12
20191121 10:17:59.284 : INFO : ${type} = <class 'bytes'>
20191121 10:17:59.288 : INFO : ${latest_str} = 12
20191121 10:17:59.292 : INFO : ${type} = <class 'str'>
20191121 10:17:59.533 : FAIL : TypeError: initial_value must be str or None, not bytes

is_secure not secure to gmail?

Hi! We use imaplibrary for our mail needs while testing our app. We just switched to a Google Apps gmail account and when we connect, Google won't let us, it sends the account an email about "a less secure app" is trying to access the account, per https://support.google.com/accounts/answer/6010255.

We can't tell our google account to accept less secure apps, we have to go through a couple days of convincing our domain administrator in IT to do it. I'm working on that, but I was wondering what specific security measures gmail is wanting, and if is_secure could be extended to support them. Thanks!

wait_for_email seems to have issues with long subject searches

I've noticed that the wait_for_email test seems to struggle when using multi word subjects. Using two words is signifigantly slower than using a one word subject search, and using 3 or more words fails. Could be a problem with imaplib itself and how it handles strings.

For example I have a test waiting for emails with the subject "Karen Test Documents for eSignature". If I do a search for Karen, Karen Test, or eSignature, the test works. If I try doing a more specific subject search, the test fails. I extended a unit test to make sure the imaplib.search function was getting called correctly, (it was), so that makes me think there's a problem with imaplib itself.

Badly named "Wait for email"

The keyword "Wait for email" should be called "Get latest email".

If you wanted a "Wait for email", you'd need to take note of when the polling begins and only return emails that match criteria after the polling began and not "any" email from the inbox. ( -5 Seconds for race-contions )

Wait For Email: UID SEARCH Failure due to backend error

Wait For Email is failing if specify sender argument.

${latest}= Wait For Email subject=Welcome! timeout=30

Works fine but if you specify sender then it starts failing.

${latest}= Wait For Email [email protected] subject=Welcome! timeout=30

Fails with error:

FAIL : imap.search error: NO, [b'[UNAVAILABLE] UID SEARCH Failure due to backend error.

I'm using @lasselindqvist ImapLibrary2 as it has the latest changes but unfortunately couldn't report the issue there.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.