Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dkim fails with Altbody #234

Closed
ghost opened this issue May 20, 2014 · 2 comments
Closed

Dkim fails with Altbody #234

ghost opened this issue May 20, 2014 · 2 comments

Comments

@ghost
Copy link

ghost commented May 20, 2014

I don't what i am doing wrong, but with simple body it pass, but if i add Altbody it says

dkim=neutral (body hash did not verify) header.i=@;

in gmail and in outlook says only "FAIL"
Here is my code.

$mail = new PHPMailer();
$mail->isSMTP();
$mail->SMTPDebug = 0;
$mail->Mailer = 'smtp';
$mail->Debugoutput = 'error_log';
$mail->SMTPSecure = 'tls';
$mail->Host = "smtp.live.com";
$mail->Port = 587;
$mail->SMTPAuth = true;
$mail->Username = "web@mydomain.com";
$mail->Password = "Password";
$mail->CharSet='UTF-8';
$mail->Encoding = 'quoted-printable';
$mail->setFrom('web@mydomain.com', 'First Last');
$mail->addReplyTo('web@mydomain.com', 'First Last');
$mail->addAddress($em, $na);
$mail->Subject = $subject.'';
$mail->AddEmbeddedImage("/images/mail/facebook-mail.png",'facebook-mail','facebook-mail.png');      // attachment
$mail->AddEmbeddedImage("/images/mail/gplus-mail.png",'gplus-mail','gplus-mail.png'); // attachment
$mail->AddEmbeddedImage("/images/mail/twitter-mail.png",'twitter-mail','twitter-mail.png'); // attachment
$mail->AddEmbeddedImage("/images/mail/back3v7[V].png",'back3v7','back3v7[V].png'); // attachment
$mail->AddEmbeddedImage("/images/mail/mails_landscape_footer.jpg",'mails_landscape_footer','mails_landscape_footer.jpg'); // attachment
$mail->Body=$html;
//=========
$mail->AltBody=$Althtml //if I disable this, it pass
//=========
$mail->DKIM_domain = 'mydomain';
$mail->DKIM_private = '/path/to/thekey.key';
$mail->DKIM_selector = 'keyselect';
$mail->DKIM_passphrase = 'password';
 if (!$mail->send()) {
    echo "Error: " . $mail->ErrorInfo;
} else {
   return true;
}
}

Can someone help me? What I am doing wrong?

@tixeunem
Copy link

Someone managed to solve this problem?

@Synchro
Copy link
Member

Synchro commented Aug 28, 2017

Please retest with 6.0 and reopen if it's still a problem.

@Synchro Synchro closed this as completed Aug 28, 2017
arnebr added a commit to arnebr/PHPMailer that referenced this issue Apr 26, 2019
The boundary for DKIM is not correct, at the moment it´s a tab it should be a witespace.
This fixes PHPMailer#234 and PHPMailer#1655 .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants