Send an email from built-in function with the espocrm

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • anhdt118
    Junior Member
    • May 2015
    • 13

    Send an email from built-in function with the espocrm

    I would like to send an email from built-in function with the espocrm, can you help me?
  • yuri
    Member
    • Mar 2014
    • 8467

    #2
    PHP Code:
    
    $email = $this->getEntityManager()->getEntity('Email');
    $email->set(array(
         'to' => 'address@address',
         'name' => 'subject',
         'body' => 'body',
         'isHtml' => true
    ));
    
    $this->getEmailSender()->send($email); 
    
    See application/Espo/Services/Email.php how to get Email Sender in your code.
    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

    • anhdt118
      Junior Member
      • May 2015
      • 13

      #3
      Thanks you

      Comment

      Working...