I'm able to fetch messages form gmail api. In the response i'm getting From and To mails as like below
{
"name": "From",
"value": Mail Delivery Subsystem **Symbol lessthan**mailer-daemon@googlemail.com**Symbol greaterthan**
}
{
"name": "To",
"value": Rahul, kumar **Symbol greaterthan**rahulkumar1234@gmail.com**Symbol lessthan**
}
I can able to access value as like below by looping.
if element.name == "From" {
print("From ::: \(String(describing: element.value!))")
}
OutPut is :
From ::: Mail Delivery Subsystem <mailer-daemon@googlemail.com>
Instead of sender name and mail. I want to get only mail and sender name individullay. how can i devide the value into two parts/strings one for name and another for mail.
Some times there is no sender name as well as lessthan and greaterthan symbols, in that time i'm getting only mail.
@vadian I've specified below of all the formats in the response. sometimes i'm not getting lessthan and greater than. And also i want to save name and email as a two seperate strings. if there is no name in the response then there is no need to grab it as a string only mail is enough to grab as a string.