Page 1 of 1

Error: 554 Transaction failed: Duplicate header 'MIME-Version'.

Posted: Thu Sep 26, 2019 9:42 am
by deanwalker
Script URL: https://helpdesk.surgeitsupport.com
Mods for HESK version: 2019.1.0
HESK version: 2.8.4
Hosting company: Walker Hosting
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution: 554 error

Write your message below:

Hi there, We use Mods for Hesk on 2 installations (using the same hosting environment) The older version (one before the latest) works fine however the new installtion is having an issue

When trying to send a reply to the customer we get an error couldnt send email - when we turn on debug mode it gives us this error

Code: Select all

Error: 554 Transaction failed: Duplicate header 'MIME-Version'.
It seems that the MIME-Version is displayed twice.

We removed the installation and started fresh

First we installed Hesk - enabled smtp and sent an email. Works perfect

Then we installed mods for hesk and then redid our test and got the same error again

Any ideas how to get around the MIME Version being outputted twice?

Thanks

Re: Error: 554 Transaction failed: Duplicate header 'MIME-Version'.

Posted: Thu Sep 26, 2019 11:33 am
by Klemen
This will probably fix it?
viewtopic.php?f=19&t=6434

Re: Error: 554 Transaction failed: Duplicate header 'MIME-Version'.

Posted: Thu Sep 26, 2019 2:07 pm
by deanwalker
I have tried that already and didn't make a difference

Thanks

Re: Error: 554 Transaction failed: Duplicate header 'MIME-Version'.

Posted: Thu Sep 26, 2019 2:11 pm
by mkoch227
deanwalker wrote: Thu Sep 26, 2019 9:42 amWhen trying to send a reply to the customer we get an error couldnt send email
Are you referring to the email when sending a new reply, or are you clicking the "Resend Email Notification" button?

Re: Error: 554 Transaction failed: Duplicate header 'MIME-Version'.

Posted: Thu Sep 26, 2019 2:23 pm
by deanwalker
Thanks for the quick responses

This is refering to all emails

When i create a ticket i dont receive any emails, I only spotted this when replying to a ticket. I have not tried the resend email notification

here is a quick screen cast of the issue

https://recordit.co/oSiVNehbIM

Thanks

Re: Error: 554 Transaction failed: Duplicate header 'MIME-Version'.

Posted: Thu Sep 26, 2019 2:24 pm
by deanwalker
Also just to point out,

This is a clean installation

Only settings changed was SMTP for Amazon SES

I tested on hesk before installing the mods and it worked fine

issue since installing the mods

Thank you for all your help

Re: Error: 554 Transaction failed: Duplicate header 'MIME-Version'.

Posted: Fri Sep 27, 2019 12:31 pm
by deanwalker
Hey any update?

Thanks

Re: Error: 554 Transaction failed: Duplicate header 'MIME-Version'.

Posted: Mon Sep 30, 2019 6:13 pm
by mkoch227
Heh, I see the issue.

In inc/email_functions.inc.php (you may want to make a backup of this file first in case things go awry), find:

Code: Select all

// Send the e-mail using SMTP
$headersArray = array(
    "From: $hesk_settings[from_header]",
    "To: $to",
    "Reply-To: $hesk_settings[from_header]",
    "Return-Path: $hesk_settings[webmaster_mail]",
    "Subject: " . $subject,
    "Date: " . date(DATE_RFC2822),
    "Message-ID: " . hesk_generateMessageID(),
    "MIME-Version: 1.0",
);
array_push($headersArray, "MIME-Version: 1.0");
Delete this line:

Code: Select all

array_push($headersArray, "MIME-Version: 1.0");
Save, upload, and test