]> git.openstreetmap.org Git - chef.git/commitdiff
Merge pull request #361 from polarbearing/patch-1
authorGrant <git@firefishy.com>
Thu, 3 Dec 2020 08:45:08 +0000 (08:45 +0000)
committerGitHub <noreply@github.com>
Thu, 3 Dec 2020 08:45:08 +0000 (08:45 +0000)
DMCA form: add Content-Type header to generated email

cookbooks/dmca/files/default/html/index.php

index d81deb70ac3913087141caa51b60065b485dbdcf..47e1afb064388f2c6858df365b942018e7fbd869 100644 (file)
@@ -12,7 +12,8 @@ function process_data ($values) {
         $email_body .= print_r($values, true);
         $reply_address = $values['name_first'].' '.$values['name_last'].' <'.$values['email'].'>';
         $email_body .= 'Formatted address: '.$reply_address."\n\n";
-        mail('dmca@osmfoundation.org','OSM Claim of Copyright Infringement', $email_body, 'From: OSMF Copyright Form <dmca@osmfoundation.org>', '-fdmca@osmfoundation.org');
+        $email_header = 'From: OSMF Copyright Form <dmca@osmfoundation.org>' . "\r\n" . 'Content-Type: text/plain; charset="utf-8"';
+        mail('dmca@osmfoundation.org','OSM Claim of Copyright Infringement', $email_body, $email_header, '-fdmca@osmfoundation.org');
 }
 ?>
 <!DOCTYPE html>