Author Topic: ERS - EMail Reporting System  (Read 30629 times)

0 Members and 11 Guests are viewing this topic.

Offline Storm

  • Full Member
  • ***
  • Posts: 220
  • Karma: 4
Re: ERS - EMail Reporting System
« Reply #15 on: July 06, 2014, 12:50:38 PM »
Yes that is what I meant. I changed only that.

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2728
  • Karma: 430
    • |G4P| Gman4President
Re: ERS - EMail Reporting System
« Reply #16 on: July 06, 2014, 02:00:02 PM »
I've just edited the report.php to use SMTP with Googlemail, you can change it to whatever you want.

Download in attachment.

I looked at the code, that can't be secure having the password to the SMTP server right there in the php file in plaintext.

Offline Neku

  • Hero Member
  • *****
  • Posts: 549
  • Karma: 27
Re: ERS - EMail Reporting System
« Reply #17 on: July 06, 2014, 02:03:17 PM »
Yes i set up an email through the control panel but I couldn't get the report emails there. Thought it might have something to do with this: Note that we do not allow automated emails through mail.nfoservers.com.

I think you should try using your email, not the one from nfoservers. I haven't tried it myself, but I did look at it.
If you can't get this running, I'll post mine so we can know if it's Mr. President's issue or your's.

Can anyone confirm that his release is working?
Out of the Garry's Mod business.

Offline Storm

  • Full Member
  • ***
  • Posts: 220
  • Karma: 4
Re: ERS - EMail Reporting System
« Reply #18 on: July 06, 2014, 02:29:07 PM »
Yes i did, I tried an aol email and a gmail email. No luck. Has anyone else been able to get it working?

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: ERS - EMail Reporting System
« Reply #19 on: July 06, 2014, 09:48:07 PM »
All, when MrP, Neku, and anyone say "your email", they do not mean your email address.
They mean the email server, or mail() php enabled server, running on your own local host of the website.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Fanney

  • Newbie
  • *
  • Posts: 44
  • Karma: 11
Re: ERS - EMail Reporting System
« Reply #20 on: July 07, 2014, 09:12:09 AM »
I looked at the code, that can't be secure having the password to the SMTP server right there in the php file in plaintext.
well no one can read the password until your server goes crazy and serves the file instead of parsing it.
Somehow the SMTP Server of the Mail Provider needs to know the password, hashing won't change it since you need a way to get the password sent to the SMTP server.

Offline Neku

  • Hero Member
  • *****
  • Posts: 549
  • Karma: 27
Re: ERS - EMail Reporting System
« Reply #21 on: July 07, 2014, 12:56:41 PM »
well no one can read the password until your server goes crazy and serves the file instead of parsing it.
Somehow the SMTP Server of the Mail Provider needs to know the password, hashing won't change it since you need a way to get the password sent to the SMTP server.

No...
His password is on his attachment.
Out of the Garry's Mod business.

Offline Fanney

  • Newbie
  • *
  • Posts: 44
  • Karma: 11
Re: ERS - EMail Reporting System
« Reply #22 on: July 07, 2014, 02:43:43 PM »
No...
His password is on his attachment.
Dont understand what you mean by that.
As long no one has access to the .php File no one will know your password (also you shouldnt use the same email that you use private).
I've just added the SMTP thingy so you dont need a local mailserver it's how it works it needs your password in some kind.

Offline Storm

  • Full Member
  • ***
  • Posts: 220
  • Karma: 4
Re: ERS - EMail Reporting System
« Reply #23 on: July 07, 2014, 04:17:52 PM »
So Fanney you just put report.php as you adjusted it on your web server and what do you do with the other files you included?

Offline Fanney

  • Newbie
  • *
  • Posts: 44
  • Karma: 11
Re: ERS - EMail Reporting System
« Reply #24 on: July 07, 2014, 04:32:16 PM »
So Fanney you just put report.php as you adjusted it on your web server and what do you do with the other files you included?
well these are from phpMailer, so it's much more reliable because it's an kinda finished lib. (so needed)

Offline Storm

  • Full Member
  • ***
  • Posts: 220
  • Karma: 4
Re: ERS - EMail Reporting System
« Reply #25 on: July 07, 2014, 04:47:29 PM »
I put report.php in a folder public/web/. Do I put those other files in the same folder as report.php?

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2728
  • Karma: 430
    • |G4P| Gman4President
Re: ERS - EMail Reporting System
« Reply #26 on: July 07, 2014, 06:13:55 PM »
I talked it over with my gurus, and yeah, php files are pretty secure so long as your server doesn't accidentally serve them as plain text, which won't happen unless php crashes on your server.


Offline DarKevin

  • Newbie
  • *
  • Posts: 23
  • Karma: 1
  • sup
Re: ERS - EMail Reporting System
« Reply #27 on: August 02, 2014, 07:16:54 PM »
Hi there, I tried adding this addon to my server, but the E-mails don't arrive in my mailbox.
I have edited the configurations.lua
When I report in game, it says "reported successfully" but I don't receive an mail.

I got myself a very simple example php script and replaced it with the default report.php and voila, it worked.
From inside the game.

This is the working code:

<?

$to = "myemail@freenet.de";
$subject = "test";
$message = "test 123";

mail ($to, $subject, $message);
echo "Recipient: $to
";
echo "Subject: $subject
";
echo "Message: $message";

?>

Any idea why the original report.php won't work for me...?
« Last Edit: August 02, 2014, 07:26:41 PM by DarKevin »

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2728
  • Karma: 430
    • |G4P| Gman4President
Re: ERS - EMail Reporting System
« Reply #28 on: August 02, 2014, 08:30:53 PM »
It might have something to do with the headers and the mail server rejecting it for trying to send mail from an e-mail address.

Find in your report.php

Code: [Select]
$headers = "From: no-reply@g4p.org\r\n";
$headers .= "Reply-To: no-reply@g4p.org\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";

and replace it with:

Code: [Select]
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";


Please let me know if this works and I'll edit the original and download.

Offline DarKevin

  • Newbie
  • *
  • Posts: 23
  • Karma: 1
  • sup
Re: ERS - EMail Reporting System
« Reply #29 on: August 03, 2014, 09:31:47 AM »
Please let me know if this works and I'll edit the original and download.
Thanks for your reply,
I'll check it out and tell you the result as soon as possible.

Edit:
That didn't fix it... How about making a light version of the php without security and stuff, for debugging?
Like just the strings and stuff that's needed to display the report.
« Last Edit: August 03, 2014, 09:54:04 AM by DarKevin »