Submission type
Generic use case
Name
Bhuvaneswaran B
Industry category in which use case would best fit in (Select up to 2 industries)
Universities/Academy
Complexity level
Intermediate
Summary (abstract)
To automatically detect and log all bounced/rejected email addresses from the placement email inbox using IMAP and save them into an Excel file (Email.xlsx).
Detailed problem statement
Rajalakshmi Engineering College conducts a prestigious Placement Dinner event annually to honor and express gratitude to the corporate recruiters—both from IT and Non-IT industries—who have supported the on-campus hiring drive. As part of this event’s organization, Mr. Sherin Maniraj, who works as a Placement Executive, is responsible for sending formal email invitations to all the HR representatives of the visiting companies. During the invitation phase, Mr. Sherin noticed that several emails were being rejected or bounced back, causing communication gaps and missed invitations. These rejections typically occur due to issues like invalid email addresses, outdated contacts, or delivery failures.
In an attempt to ensure accurate records for future events and to prevent such email delivery failures, Mr. Sherin started marking all bounced or rejected emails as unread manually. However, checking through hundreds of unread emails and identifying the bounce-back responses manually is highly tedious, time-consuming, and error-prone. Given the high volume of such emails, it becomes nearly impossible for him to track and maintain a record of all invalid email addresses without automation.
To address this challenge, he approached Mr. B. Bhuvaneswaran, an Assistant Professor (SG) in the Department of Computer Science and Engineering, who possesses strong expertise in Robotic Process Automation (RPA) using UiPath. Mr. Bhuvaneswaran proposed to design a bot using UiPath that automates the entire process.
Detailed solution
Step 1: Initialize the Process
- Create a new UiPath Project named PlacementEmailBounceTracker.
- Install UiPath.Mail.Activities from the Manage Packages panel.
Step 2: Read Emails via IMAP
- Use the Get IMAP Mail Messages activity.
- Server: imap.yourmailserver.com
- Port: 993 (SSL enabled)
- Email & Password: Configure securely using Orchestrator Assets or Windows Credentials.
- Output: A variable of type List named mailMessages.
- Filter unread messages: OnlyUnreadMessages = True.
- Set Top to 100 or desired number of emails.
Step 3: Create a DataTable
- Use Build DataTable activity to create a table named dtBouncedEmails.
- Columns:
- EmailID (String)
- Subject (String)
- Date (String)
- ErrorMessage (String)
Step 4: Analyze Each Email
- Use For Each activity to iterate through mailMessages.
- Type Argument: System.Net.Mail.MailMessage.
- Inside the loop:
- Check Bounce Keywords:
. Use an If activity to verify if the email Subject or Body contains keywords like:
. “Delivery has failed”
. “Undeliverable”
. “Message not delivered”
- Check Bounce Keywords:
- Example condition:
mail.Subject.ToLower.Contains(“undeliverable”) OrElse
mail.Body.ToLower.Contains(“delivery has failed”)
Step 5: Extract Rejected Email Address
- Use Regex to find email addresses from the mail.Body:
System.Text.RegularExpressions.Regex.Match(mail.Body, “[a-zA-Z0-9._%±]+@[a-zA-Z0-9.-]+.[a-zA-Z]{2,}”).Value - Store the result in a variable bouncedEmail.
Step 6: Add Data to DataTable
- Use Add Data Row activity:
- ArrayRow: {bouncedEmail, mail.Subject, mail.Headers(“Date”), “Bounced/Rejected”}
- DataTable: dtBouncedEmails.
Step 7: Write to Excel
- Use Write Range (under Excel Application Scope):
- Path: “C:\Path\To\Email.xlsx”
- DataTable: dtBouncedEmails
- Starting Cell: “A1”
Step 8: End Process
- Display a Message Box saying:
"Bounced email addresses successfully captured and saved in Email.xls
Expected impact of this automation
- Improved Efficiency
- Accurate Identification of Bounced Emails
- Better Email Record Maintenance
- Enhanced Communication Workflow
- Reusability & Scalability
- Data-Driven Decision Making
- Increased Professionalism
UiPath products used (select up to 4 items)
UiPath Assistant
UiPath Orchestrator
UiPath Studio
UiPath Studio Web
Automation Applications
Excel
