When i typed ajaynnair2@ in the To section of SMTP, process gets run eventhough mail is not correct and marked as successful in orchestrator.
How can i solve this because i have an excel file contains incomplete mails.
Hi @ajaynnair2 ,
Before passing the Mail id try to peform some validations
like
Assume,
take assign acitivity
(mailAddress)[Left side] = New MailAddress(str_Mail)[Right side]
if the above code gives you an error then it means that email is not valid
so keep the above line in try catch block and handle it that way.
Regards,
Firoz
can you show an example?
Hello @ajaynnair2
Welcome to UiPath community…!
As per my understanding you are trying to get email id from excel and if there is some wrong excel, you need to validate it before using the SMTP activity.
If this udnerstanding is correct, then you can do as below.
- Use the Ismatch activity and put the regex pattern
^[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}
This helps to validate the format of the email id.
2) if output is true, then use an if condition and add to smtp acitivty, else skip.
Thanks
solved.Thanks
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.