ILIAS  trunk Revision v11.0_alpha-1749-g1a06bdef097
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
Mail.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
24 use ilMailException;
25 use ilMail;
26 
28 {
29  public function __construct()
30  {
31  parent::__construct(false);
32  }
33 
34  public function sendGeneric(string $subject, string $body): void
35  {
36  foreach ($this->getRecipients() as $rcp) {
37  try {
38  $this->handleCurrentRecipient($rcp);
39  } catch (ilMailException) {
40  continue;
41  }
42 
43  if (!$this->getCurrentRecipient()) {
44  continue;
45  }
46 
47  $this->initMimeMail();
48  $this->initLanguageByIso2Code();
49 
50  $this->setSubject($subject);
51  $this->appendBody($body);
53 
54  $this->sendMimeMail($this->getCurrentRecipient());
55  }
56  }
57 }
sendGeneric(string $subject, string $body)
Definition: Mail.php:34
RFC 822 Email address list validation Utility.
__construct(Container $dic, ilPlugin $plugin)
static _getInstallationSignature()