Announcement

Collapse
No announcement yet.

Unfilled 'to' field if sent via record\create and ext\email\send

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Unfilled 'to' field if sent via record\create and ext\email\send

    $id = record\create(
    'Email',
    'from', 'XXX@XXX.com',
    'to', 'YY@yy.com',
    'subject', name,
    'body', conent1,
    'isHtml', true,
    'status', 'Sending'
    );

    ext\email\send($id);​​​

    creates email with empty 'to' field (in attach). It seems to be a bug.

    I can fill this fiels with:

    $idarrd = record\findOne('EmailAddress','','', 'name',$toemail);
    ifThen($idarrd == '',
    $idarrd = record\create(
    'EmailAddress',
    'name', $toemail,
    'lower', $toemail
    );
    );
    record\relate('Email', $id,'toEmailAddresses', $idarrd);​

  • #2
    Hi iioi,

    Please tell me which version of EspoCRM are you using?

    Comment


    • #3
      7.1.7

      Comment


      • #4

        Hi iioi ,

        I can't reproduce this issue on version 7.1.7. Everything works as it should. Field "to" is filled with the email address that we specified in the formula.
        You may have some customizations in your EspoCRM files that affect the filling of the Email entity attributes.​

        Comment


        • #5
          Do you have YY@yy.com record in EmailAddress when ext\email\send($id) ​ ?
          Last edited by iioi; 09-30-2022, 02:19 PM.

          Comment


          • victor
            victor commented
            Editing a comment
            I tested a variant of the first formula several times. Field "to" is filled with the email address that we specified in the formula.
        Working...
        X