Announcement

Collapse
No announcement yet.

Send email from task

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

  • Send email from task

    Hello.

    Need send email from arhive. I try use Email service, but arhive mail dont have "from" (field fill at panel).

  • #2
    "To" field empty too. But PDO (SELECT name FROM email_address JOIN email_email_address ON (email_address_id = email_address.id) WHERE email_id = :email_id) is working :\

    Comment


    • #3
      Send mail from arhive. Total:

      PHP Code:
      $mail $this->getEntityManager()->getEntity('Email'$id);
      $sender->send($mail); 

      Not working (Zend\Mail\Transport\Smtp transport expects at least one recipient if the message has at least one header or body).

      PHP Code:
      $newMail $this->getEntityManager()->getEntity('Email');
      $newMail->populateFromArray($mail->toArray());
      $newMail->set([ 'from' => $fromAddressRecvPDO,
      'to' => implode(';'$toAddressesRecvPDO), ]);
      $sender->send($newMail); 

      Working.

      Comment

      Working...
      X