Published on January 26, 2024By DeveloperBreeze
$to = 'recipient@example.com';
$subject = 'Attachment Test';
$message = 'Check out the attached file.';
$file = 'path/to/attachment.pdf';
$headers = 'From: sender@example.com';
mail($to, $subject, $message, $headers, ['attachment' => $file]);
Comments
Please log in to leave a comment.