Hi Team
I need help, how do i send attachments as pdf to the mail recepient? My code is not sending attachment but only show total attachment size from the email.
// logic
";
$headers = "From: $from";
// Boundary
$semi_rand = md5(time());
$mime_boundary = "==Multipart_Boundary_x{$semi_rand}x";
// Headers for attachment
$headers .= "\nMIME-Version: 1.0\n" .
"Content-Type: multipart/mixed;\n" . " boundary=\"{$mime_boundary}\"";
// Multipart boundary
$message = "--{$mime_boundary}\n" . "Content-Type: text/html; charset=\"UTF-8\"\n" .
"Content-Transfer-Encoding: 7bit\n\n" . $message . "\n\n";
// Preparing attachment
if(!empty($received_email_send)){
for($i=0;$i
Total Attachments: '.count($received_email_send).'
';
// Call function and pass the required arguments
$sendEmail = multi_attach_mail($to, $subject, $htmlContent, $from, $fromName, $received_email_send);
// Email sending status
if($sendEmail){
echo 'The email is sent successfully.';
}else{
echo 'Email sending failed!';
}
?>
Guest UserPosted Mar 8, 2023, 6:51 AM
Hi Arvind please tell where exactly must this implementation be inserted... I have made some changes below but the logic still the same, current problem now i can only get one attachment but cant view the document its not opening and need your help below. Point out by showing what needs to change etc, rest will know and test it, let you know asap.
Arvind YadavPosted Mar 7, 2023, 7:18 PM