Modify email files arriving into SMTP server

When you send any email it arrives into Pickup folder of SMTP server in the form of .eml file. SMTP server continuously monitor Pickup folder for any incoming file. If any file is available, then it is read and checks its integrity.

If the format of .eml is incorrect then it is sent to BadFiles folder, otherwise it is sent to Queue folder from where SMTP forwards email to specified recipients.

If there a requirement to modify recipients, subject or content of the email after it arrives to SMTP server, then it can be achieved using different mechanism:

SMTP server rules:
You can create rules in SMTP server to modify email before forwarding to recipients.

Create macros:
Macros are very powerful scripts that can read the content of .eml files. They can be written in VB Script (.vbs file) which can read each incoming .eml file within Pickup folder and process as needed.

Socket programming:
Write a code based on socket programming or HTTP pipeline that picks the inflow of content to SMTP server.

No comments:

Post a Comment