Validation on Reply-To Email Based on Incoming Email Address

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • IshitaRana
    Junior Member
    • Apr 2025
    • 11

    #1

    Validation on Reply-To Email Based on Incoming Email Address

    Hi,

    I’m trying to implement a custom validation on the reply functionality.


    When replying to an incoming email, I want to restrict the selectable "From" email addresses based on the sender of the original email. Example:
    • If the incoming email is from abc@gmail.com, then the reply should only be sent from def@gmail.com.
    • If the user selects a different reply-from address (e.g., ghi@gmail.com), it should throw an error and prevent sending the email.
    • This validation should support multiple such mappings, like:
    • What’s the best way to implement this kind of validation in EspoCRM?
  • yuri
    Member
    • Mar 2014
    • 9178

    #2
    Hello,

    It's possible to use API Before Save Script for the Email entity type. https://docs.espocrm.com/administrat...e-save-script/

    The formula script could check certain fields and throw an error with a custom message.
    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

    Comment

    Working...