Skip to content

Commit 1b0c7c0

Browse files
committed
Update debug.php
1 parent c22cf6a commit 1b0c7c0

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

debug.php

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
<?php
2-
require_once(__DIR__ . "/berry/utils.php"); // Include berry utils package
3-
4-
// Initialize a new Mailer
5-
$mailer = new Mailer();
2+
require_once(__DIR__ . "/berry/email.php"); // Include berry email package
63

74
$htmlContent = '<h1>Email Title</h1>';
85
$htmlContent .= '<div>Dear customer, this is Elon Musk...</div>';
96

10-
$subject = "Email subject...";
11-
$fromEmail = "elonmusk@email.com";
12-
$fromTitle = "Elon Musk";
13-
$toEmail = "customer@customerdomain.com";
7+
$email = new EMail();
8+
$email->setSenderAddress("elonmusk@email.com");
9+
$email->setSenderName("Elon Musk");
10+
$email->setRecipientAddress("customer@customerdomain.com");
11+
$email->setSubject("This is a test");
12+
$email->setHTMLContent($htmlContent);
1413

15-
if (!$mailer->SendEmail($htmlContent, $subject, $fromEmail, $fromTitle, $toEmail))
14+
if ($email->Send())
15+
{
16+
print "Email sent!";
17+
}
18+
else
1619
{
1720
print "Unable to send the email!";
1821
}

0 commit comments

Comments
 (0)