What are some alternative methods to sending emails in PHP without using plugins?

Sending emails in PHP without using plugins can be achieved by using the built-in `mail()` function. This function allows you to send emails directly from your PHP script without the need for additional plugins. By specifying the recipient, subject, message, and headers, you can customize the email content and send it to the desired recipient.

$to = "recipient@example.com";
$subject = "Test Email";
$message = "This is a test email sent from PHP.";
$headers = "From: sender@example.com";

// Send email
if (mail($to, $subject, $message, $headers)) {
    echo "Email sent successfully.";
} else {
    echo "Email sending failed.";
}