Email's Body show as None
Hi! I'm trying to use the GuerrillaMailSession to generate an email and retrieve a verify your email message, but every time i retrieve the emails Body it returns as being None, is there any reason this could happen?
Can you provide a code example to demonstrate the issue you are having?
Sure can!
# We set our Guerrilla email.
email_session = GuerrillaMailSession()
temp_email = email_session.get_session_state()['email_address']
sleep(15)
for x in iter(context.email_session.get_email_list()): print(x.body)
I have some Code in between that handles the Registration in the page, other than that thats all im doing.
There results of the print returns this for the latest email
None
And this for the regular guerrilla email:
Dear Random User,
Thank you for using Guerrilla Mail - your temporary email address friend and spam fighter's ally!...
The "list messages" API call does not include message bodies. You will need to call the "get message" API for each message you need the body for.
Sorry l should have added API docs in the readme so this is clearer.
Could you give me an example? Do you mean i would have to do a request to the api itself and not use the repo the GuerrillaMailSession() for me to be able to see the body of each message?
email_summary = email_session.get_email_list()[0]
email = email_session.get_email(email_summary.guid)
print email.body