How to getmail id from mail body in gmail account?

activities
studio

#1

Hi,
I want to get mail id from the mail body from gmail account. Like:-"xxx@xxx.com".

Is there any any idea for getting mail id from mail body??


#2

Hi @sarvam,

Email.Sender.Address, E-mail.From.Address

Regards,
Arivu


#3

@sarvam, Refer this,

Regards,
Dominic :slight_smile:


#4

Thanks for response to query @arivu96,
But I want mail id from body of mail.

like:- in mail body
snskcnl
cknclk
dkclk
xyz@xxx.com

I want to get/read only mail-id from body.

Can you please give another solution for same.


#5

Hi @sarvam,

use Regex expression to get the mail id from the string.

Refer
https://regex101.com/r/PLSUHj/3

Regards,
Arivu


#6

@arivu96 @Dominic
How can I retrieve mail-id from mail body using “Matches” activity with regex.??


#7

Hi @sams,

Use Matches activity
Properties
Input -> strvalue
Pattern ->[a-zA-Z0-9-_.]+@[a-zA-Z.]+
Result -> Ienum variable IEnumerable

using for each you can get all the mail ids.
if you want to get first mail id, use below code
Ienum(0).Tostring

Regards,
Arivu :slight_smile:


Data Read from text file
#8

Thanks @arivu96, Its work.