sourcebans-pp icon indicating copy to clipboard operation
sourcebans-pp copied to clipboard

mail(): Multiple or mailformed newlines found in additional_header

Open BlagoYar opened this issue 6 years ago • 13 comments

What are the steps to reproduce this issue?

  1. I filled all the fields in the "Complaint to the player"
  2. After clicking "Send" a message appeared that the complaint was sent (and this is so) (for verification)

What happens?

After clicking "Send" also an error occurred, repeated 5 times (see screenshot) ScreenShot I also have permanent errors in the log: ScreenShot

What versions of software are you using?

Operating System: Windows 7 x64 SP1 SourceBans++ Version: 1.6.3 PHP Version: 5.5.38 MySQL Version: 5.5.60-MariaDB Link to your project: Link Link to a phpinfo() output: ScreenShot Or Link to phpinfo one the project

BlagoYar avatar Jan 20 '19 00:01 BlagoYar

Can you try to replicate with the default theme

rumblefrog avatar Jan 20 '19 02:01 rumblefrog

This is not related with theme, because headers can't be modified with tpl-files.

CrazyHackGUT avatar Jan 20 '19 18:01 CrazyHackGUT

Trying to keep issues consistent with reproduce env but I think I'll let Gro look into it

rumblefrog avatar Jan 20 '19 19:01 rumblefrog

Can you try to replicate with the default theme Yes, the same https://farm5.staticflickr.com/4880/46819032121_3b68e3d16e_o.png

BlagoYar avatar Jan 20 '19 22:01 BlagoYar

Interesting.

Since it's the first time coming up here, can you verify that mail() is working outside of SourceBans++, just to make sure that it isn't some kind of configuration issue.

Groruk avatar Jan 20 '19 23:01 Groruk

<?php
$to = '[email protected]';
$subject = 'It\'s working?';
$message = 'Hello, world?';

var_dump(mail($to, $subject, $message));

You can use this code for testing mail().

CrazyHackGUT avatar Jan 21 '19 04:01 CrazyHackGUT

<?php
$to = '[email protected]';
$subject = 'It\'s working?';
$message = 'Hello, world?';

var_dump($mail($to, $subject, $message));

You can use this code for testing mail().

How to? What to do with it?

BlagoYar avatar Jan 21 '19 04:01 BlagoYar

Copy this code, insert in any file with extension PHP, save, and open in browser.

Don't forget replace email.

CrazyHackGUT avatar Jan 21 '19 09:01 CrazyHackGUT

Copy this code, insert in any file with extension PHP, save, and open in browser.

I thought it needed to be inserted into some file or replaced somewhere, since you do not have ?>

Therefore I tried both with closing and without. I inserted, upload to root of site and HTTP ERROR 500

BlagoYar avatar Jan 21 '19 14:01 BlagoYar

?>

This is not required. If you're using not old PHP.

Anyway, i updated code. Small mistake. I written $mail as function name. Required just mail, without dollar.

CrazyHackGUT avatar Jan 21 '19 14:01 CrazyHackGUT

Anyway, i updated code. Small mistake. I written $mail as function name. Required just mail, without dollar.

Did not quite understand. What should be done? Change $mail to mail? Where should it be done?

BlagoYar avatar Jan 22 '19 04:01 BlagoYar

Just replace:

var_dump($mail($to, $subject, $message));

to:

var_dump(mail($to, $subject, $message));

CrazyHackGUT avatar Jan 22 '19 14:01 CrazyHackGUT

Just replace: to:

> var_dump(mail($to, $subject, $message));

After that, only two words bool(true)

Letter came. What does it mean? $mail need to change to mail in some file?

BlagoYar avatar Jan 25 '19 07:01 BlagoYar