Hello all
When I log in to a website due to 2fa it sends otp in Gmail. so how can I fetch only otp from email?
I have attached an image for reference
Hello all
When I log in to a website due to 2fa it sends otp in Gmail. so how can I fetch only otp from email?
I have attached an image for reference
Get it by using Regex.
but how can filter this email do you have any demo for that.
use a subject line or from email
a part of subject line also can be used
one example depending on email you have diff options
cheers
Working
@Anil_G thankyou
Hi,
\b\d{6}\b
to match it.Example:otpCode = System.Text.RegularExpressions.Regex.Match(mail.Body, "\b\d{6}\b").Value
Regards,
Kardelen