Skip to content

Commit f795b03

Browse files
jsquyreshppritcha
authored andcommitted
fix problem with malformed new lines
in the alerts.php script. Looks like when we moved to AWS we hit a variant of this issue https://stackoverflow.com/questions/30887610/error-with-php-mail-multiple-or-malformed-newlines-found-in-additional-header and the script for nightly MTT results was never changed till now to fix this. Also up to 24 hours results reported for the morning cron job. Signed-off-by: Howard Pritchard <[email protected]>
1 parent c0ac3fd commit f795b03

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

server/php/cron/alerts.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,14 @@
5959
# Reference:
6060
# http://www.zend.com/zend/trick/html-email.php
6161

62+
63+
6264
$headers = "From: [email protected]\r\n";
6365
$headers .= "MIME-Version: 1.0\r\n";
6466
$boundary = uniqid("MTTREPORT");
6567
$headers .= "Content-Type: multipart/alternative" .
66-
"; boundary = $boundary\r\n\r\n";
67-
$headers .= "This is a MIME encoded message.\r\n\r\n";
68+
"; boundary = $boundary\r\n";
69+
$headers .= "This is a MIME encoded message.\r\n";
6870
# $headers .= "--$boundary\r\n" .
6971
# "Content-Type: text/plain; charset=ISO-8859-1\r\n" .
7072
# "Content-Transfer-Encoding: base64\r\n\r\n";
@@ -99,7 +101,7 @@
99101
# if we can not find it - send the email
100102
elseif (! contains_null_result_msg($html)) {
101103
$report = chunk_split(base64_encode($html));
102-
mail($email, $section, '', $headers . $report);
104+
mail($email, $section, $report, $headers);
103105
}
104106
# Do not email a blank report
105107
else {

server/php/cron/morning.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
;
44

55
[Morning MTT Results Summary]
6-
url="https://mtt.open-mpi.org/index.php?&text_start_timestamp=past+12+hours&show_start_timestamp=show&text_http_username=all&show_http_username=show&text_local_username=all&show_local_username=hide&text_platform_name=all&show_platform_name=show&text_platform_hardware=all&show_platform_hardware=show&text_os_name=all&show_os_name=show&text_mpi_name=all&show_mpi_name=show&text_mpi_version=all&show_mpi_version=show&go=summary&click=summary&phase=all_phases&text_trial="
6+
url="https://mtt.open-mpi.org/index.php?&text_start_timestamp=past+24+hours&show_start_timestamp=show&text_http_username=all&show_http_username=show&text_local_username=all&show_local_username=hide&text_platform_name=all&show_platform_name=show&text_platform_hardware=all&show_platform_hardware=show&text_os_name=all&show_os_name=show&text_mpi_name=all&show_mpi_name=show&text_mpi_version=all&show_mpi_version=show&go=summary&click=summary&phase=all_phases&text_trial="
77
88

99
; [Morning MPI Install Failures]

0 commit comments

Comments
 (0)