]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/dmca/files/default/html/index.php
DMCA form: add Content-Type header to generated email
[chef.git] / cookbooks / dmca / files / default / html / index.php
index 6e6aa972f1cbc012c2eeff817c11fd7441c43d33..47e1afb064388f2c6858df365b942018e7fbd869 100644 (file)
@@ -10,7 +10,10 @@ function process_data ($values) {
         $email_body = 'OpenStreetMap - Claim of Copyright Infringement form:'."\n\n";
         $email_body .= 'Automated Email - Form Posted.'."\n\n";
         $email_body .= print_r($values, true);
-        mail('dmca@osmfoundation.org','OSM Claim of Copyright Infringement', $email_body, 'From: OSMF Copyright Form <dmca@osmfoundation.org>', '-fdmca@osmfoundation.org');
+        $reply_address = $values['name_first'].' '.$values['name_last'].' <'.$values['email'].'>';
+        $email_body .= 'Formatted address: '.$reply_address."\n\n";
+        $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>
@@ -37,7 +40,8 @@ $form->addElement('static', null, '<p>To file a copyright infringement notificat
 <li>A statement that the complaining party has a good faith belief that use of the material in the manner complained of is not authorized by the copyright owner, its agent, or the law.
 <li>A statement that the information in the notification is accurate and, under penalty of perjury, that the complaining party is authorized to act on behalf of the owner of an exclusive right that is allegedly infringed.
 </ul><p>To expedite our ability to process your request, such written notice should be sent to our designated agent via our online copyright complaint form below.</p>
-<p>This form is only for cases where you believe that material on OpenStreetMap\'s websites or in its geodata database infringes your copyright or that of your clients. For example, you claim someone has copied material from a map belonging to you. If you have come here for another reason, <a href="http://www.osmfoundation.org/wiki/License/Takedown_procedure/When_To_Use_The_Form">Go here</a>.</p>');
+<p>This form is only for cases where you believe that material on OpenStreetMap\'s websites or in its geodata database infringes your copyright or that of your clients. For example, you claim someone has copied material from a map belonging to you.</p>
+<p>If you have come here for reporting map inaccuracies, privacy issues or another reason, <a href="https://wiki.osmfoundation.org/wiki/Licence_and_Legal_FAQ/Takedown_procedure/When_To_Use_The_Form">Read here</a>.</p>');
 
 $form->addElement('text', 'url',                'URL of Allegedly Infringing Material', array('size' => 50, 'maxlength' => 255));
 $form->addRule('url', 'Please enter URL of Allegedly Infringing Material', 'required', null, 'client');