I am working with phpmailer and trying to send an email with attachment but email is not working (no email sending) as well as attachment.
require_once 'phpmailer/class.phpmailer.php';
if (isset($_REQUEST['FindDealer'])) {
$mail->AddAddress('whoto@otherdomain.com', 'John Doe');
$mail->SetFrom('name@yourdomain.com', 'First Last');
$mail->AddReplyTo('name@yourdomain.com', 'First Last');
$mail->Subject = 'PHPMailer Test Subject via mail(), advanced';
$mail->AltBody = 'To view the message,
$mail->MsgHTML(file_get_contents('contents . html'));
$email->AddAttachment( $file_to_attach , 'pdf . pdf);
return $email->Send();
exit;
}
Please guide me about this ..