create-prisma-php-app 1.9.7 → 1.9.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,6 +7,9 @@ use PHPMailer\PHPMailer\Exception;
7
7
  use Lib\Prisma\Classes\Validator;
8
8
  use Dotenv\Dotenv;
9
9
 
10
+ $dotenv = Dotenv::createImmutable(\DOCUMENT_PATH);
11
+ $dotenv->load();
12
+
10
13
  class Mailer
11
14
  {
12
15
  private PHPMailer $mail;
@@ -14,9 +17,6 @@ class Mailer
14
17
 
15
18
  public function __construct()
16
19
  {
17
- $dotenv = Dotenv::createImmutable(\DOCUMENT_PATH);
18
- $dotenv->load();
19
-
20
20
  $this->mail = new PHPMailer(true);
21
21
  $this->setup();
22
22
 
@@ -84,8 +84,8 @@ class Mailer
84
84
  $this->mail->AltBody = $altBody;
85
85
 
86
86
  return $this->mail->send();
87
- } catch (\Exception) {
88
- echo "Message could not be sent. Mailer Error: {$this->mail->ErrorInfo}";
87
+ } catch (\Exception $e) {
88
+ throw new \Exception($e->getMessage());
89
89
  }
90
90
  }
91
91
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-prisma-php-app",
3
- "version": "1.9.7",
3
+ "version": "1.9.8",
4
4
  "description": "Prisma-PHP: A Revolutionary Library Bridging PHP with Prisma ORM",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",