I am using phpmailer class to send email and i am attaching a file to the mail. The email is sent successfully but the attachment which is an sql file is empty which should not be the case. I have tried with an image file, but it seems that every file that i attach is empty. Can anyone help me solve this problem please?
$mail = new PHPMailer();
$body = "Reminder";
$mail->IsSMTP();
$mail->Host = "mail.yourdomain.com";
$mail->SMTPDebug = 1;
$mail->SMTPAuth = true;
$mail->SMTPSecure = "ssl";
$mail->Host = "smtp.gmail.com";
$mail->Port = 465;
$mail->Username = "abc@gmail.com";
$mail->Password = "abc";
$mail->SetFrom('abc@gmail.com',
'blbla');
$mail->AddReplyTo("name@yourdomain.com","First Last");
$mail->Subject = "Your order has been successfully placed"
$mail->MsgHTML($body);
$mail->AddAddress("xyz@live.com","xyz");
$mail->AddAttachment("D:\b2\shop3.sql","shop3.sql");
GÜNCELLEME: Ben eklemeden önce dosya boyutunu görüntülemek için denedim ve aslında dosya boyutunu görüntüler. Herkes bana lütfen yardımcı olabilir misiniz?