question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Get email body with the check_inbox function

See original GitHub issue

Hello,

Thanks very much for this very useful lib!

I wonder if it’s possible to get the email content when using the check_inbox function. I had a look at the code and this doesn’t seem to be supported.

Thanks for your help! Thierry

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
dsmurrellcommented, Oct 13, 2019

Hey @levz0r, I’m trying this out now and I believe that check_inbox has some useful functionality that get_messages is missing. That is, it waits for a while until it grabs the exact email you’re looking for. I’m also writing some tests which rely on sending a registration email off and doing something with the body when it arrives in the gmail inbox, and I’m finding that if I use get_messages alone, then it gets them too early - before the email I want has arrived and my tests fail.

I can use check_inbox and then run get_messages, which works, and which I am resorting to now, but having the body come back as part of check_inbox for a single email sure would be handy. It would be far less code in the testing framework and also 1 let call to _get_recent_email.

Might it be worth accepting PR: https://github.com/levz0r/gmail-tester/pull/8 as submitted by @templth ?

0reactions
levz0rcommented, Sep 8, 2019

P.S

In the post we are using check_inbox, because we do not do assertions on the email body. If we would need to that, we would use get_messages

Read more comments on GitHub >

github_iconTop Results From Across the Web

excel - Email based on checkbox - If function - Stack Overflow
I'm trying to send an automated mail based on whether a checkbox is checked. The code works perfectly without the If function. But...
Read more >
Solved: Read email content from body of the email, extract...
Solved: I would love to be able to create a flow that can read the body of the email not just subject or...
Read more >
How to add checkbox controls or checkbox marks into email ...
In this article, we will introduce a couple of ways to add checkboxes in email messages at ease in Outlook. Add checkbox marks...
Read more >
Class GmailApp | Apps Script - Google Developers
Retrieve an email message draft by ID. Use this in conjunction with getId() on Gmail drafts. // Get the first draft message ......
Read more >
<input type="email"> - HTML: HyperText Markup Language
When you create an email input with the proper type value, email , you get automatic validation that the entered text is at...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found