cancel
Showing results for 
Search instead for 
Did you mean: 

Getting Content from an Email

SOLVED
Occasional Contributor

Getting Content from an Email

Hey Community

 

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.

 

C

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Moderator

Re: Getting Content from an Email

Hi @cpentecost,

 

There is no special feature for reading content of email messages in ReadyAPI, but, you can try to do this using groovy scripting.



 Join SmartBear Connect next April in Boston to meet with software development, API and testing experts from around the world! Get your ticket today!

View solution in original post

5 REPLIES 5
Super Contributor

Re: Getting Content from an Email

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.

Community Hero

Re: Getting Content from an Email

@cpentecost

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

Nice one!

Rich
if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
Community Manager

Re: Getting Content from an Email

Thank you guys! 

 

Hi @cpentecost, please provide the Community with more info as required so we can help you! 



Sonya Mihaljova
Community and Education Specialist

 Join SmartBear Connect next April in Boston to meet with software development, API and testing experts from around the world! Get your ticket today!
Occasional Contributor

Re: Getting Content from an Email

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,

 

Thanks 

Highlighted
Moderator

Re: Getting Content from an Email

Hi @cpentecost,

 

There is no special feature for reading content of email messages in ReadyAPI, but, you can try to do this using groovy scripting.



 Join SmartBear Connect next April in Boston to meet with software development, API and testing experts from around the world! Get your ticket today!

View solution in original post