Sending an email using worklow as a reply

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • LuckyLouie
    Senior Member
    • Nov 2017
    • 172

    Sending an email using worklow as a reply

    Hello,
    Is it possible to send a reply to an e-mail using workflow/bpm so that the message is a reply to the sent e-mail(the chain of correspondence must be maintained)?
  • abidoss
    Senior Member
    • Mar 2023
    • 228

    #2
    You can execute that in a Formula script.

    PHP Code:
    
    $subject = string\concatenate(
    'Automatic response ', name);
    
    $id = record\create(
        'Email',
        'from', 'exmeple@test.com',
        'to', fromAddress,
        'subject', $subject,
        'body', '$body',
        'isHtml', true,
        'status', 'Sending'
    );
    ext\email\send($id);

    Comment

    • yuri
      Member
      • Mar 2014
      • 8440

      #3
      With formula, when you create an email record, set 'repliedId' with the ID of the the email you are replying to.
      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

      • LuckyLouie
        Senior Member
        • Nov 2017
        • 172

        #4
        Thank you yuri
        Is possible to obtain user signature and use it in email send via formula?
        Click image for larger version

Name:	obraz.png
Views:	152
Size:	16.5 KB
ID:	100722

        Comment

        Working...