send email with attachment in php
Use the phpmailer class to add attachments
function emailWithAttachment($to, $subject, $message, $attachment)
{
$mail = new PHPMailer();
$mail->AddAddress($to);
$mail->From = "your@email.com";
$mail->FromName = "Your Name";
$mail->Subject = $subject;
$mail->Body = $message;
Comments
Post a Comment