Getting Content from an Email
I want to read a generated code in an email sent by one of the API's that we are currently testing in Ready API 3.0.
Is there a way to take the content of the email so that we can extract the code to pass to another API Call?
Any Help is Appreciated.
Solved! Go to Solution.
Can you show an example for that "generated code in an email sent by one of the API's"? How the content looks like? Its in xml/json format.. Just explain.
Just expanding avidCoder's query.
Are you saying you send a request to an endpoint and a response comes back and the payload of the response is an email (say .html type so the content can be read by an xmlparser) or are you saying that an email is sent out to a specific mailbox and the content of the email includes a value you need to correlate?
Reason i ask is that if you just get a response with a payload as an email then thats workable (even if worst case the content type is just text/plain), but if theres some email generator that sends an email to a specific mailbox i think youre going to struggle to incorporate ReadyAPI! into your testing.
Need to know more details about your use case to gain a clear understanding of what you need to do before we can try and help out fella.
Dedinitely need to know the datatypeof the response payload for the email which is revealed in the http headers
Thank you guys!
Hi @cpentecost, please provide the Community with more info as required so we can help you!
Community and Education Specialist
Sorry for the Late Reply.
So the Code we are looking to get Comes in a Generated Email sent to a predetermined inbox.
We send a msg for a verification code from a third party and then that code is emailed to the predetermined inbox.
we sort of figured that this may not verifiable through ReadyAPI but we figured we would ask the question.
Let us know your thoughts,
There is no special feature for reading content of email messages in ReadyAPI, but, you can try to do this using groovy scripting.
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️