Struggle with Email From Name

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Ashif Malayil
    Senior Member
    • Dec 2023
    • 211

    #1

    Struggle with Email From Name

    Hi,

    I have a workflow to send an email from the assigned user's email, which is configured as their personal account. However, when the email appears in the CRM email section, it shows the "From" address as the assigned user's email, but in Thunderbird, it shows the "From" address as the outbound email. What could be the issue?
  • lazovic
    Super Moderator
    • Jan 2022
    • 1069

    #2
    Hi Ashif Malayil,

    Can you please show what the action for sending an email looks like in your workflow? Personal information can be blurred out; the main thing is that it is more or less clear what is indicated in the fields.

    Comment

    • Ashif Malayil
      Senior Member
      • Dec 2023
      • 211

      #3
      Hi lazovic,

      This is the formula i am executing in workflow to trigger emails.

      $from = assignedUser.emailAddress;

      // Convert cMultipleEmails string to array
      $emails = string\split(cMultipleEmails, '\n');

      // Check if emails array is not empty
      if (!array\length($emails)) {
      exit;
      };

      // Iterate over the email addresses
      $index = 0;
      while ($index < array\length($emails)) {
      $currentEmail = array\at($emails, $index);

      // Generate the PDF attachment
      $attachmentId = ext\pdf\generate(
      'Account',
      entity\attribute('id'),
      '123456789',
      'tTest.pdf'
      );

      // Check if email and attachment are valid
      if ($currentEmail && $attachmentId) {
      // Create email record
      $emailId = record\create(
      'Email',
      'from', $from,
      'to', $currentEmail,
      'subject', '',
      'body', '',
      'isHtml', true,
      'attachmentsIds', list($attachmentId),
      'parentId', entity\attribute('id'),
      'parentType', 'Account',
      'status', 'Draft'
      );
      // Apply the email template
      ext\email\applyTemplate($emailId, '123456789');
      // Send the email
      ext\email\send($emailId);
      };

      $index = $index + 1;
      };

      Comment

      Working...