here is the problem, couldn't find much googling, hope somebody here got the answer for this. My PHP file is sending emails as feedback to me, and it takes 5 arguments, whenever I send long arguments to my PHP file, it trims the end of argument 5, which is the longest one, how can I fix that? To be more clear argument 5 is pretty much the email body.
Here is the PHP code:
<?php
include('Mail.php');
$arg1 = $argv[1]; //appName and version
$arg2 = $argv[2]; //ErrorMessage
$arg3 = $argv[3]; //ErrorData
$arg4 = $argv[4]; //ErrorSource
$arg5 = $argv[5]; //ErrorStackTrace
$arg1 = $_GET['arg1'];
$arg2 = $_GET['arg2'];
$arg3 = $_GET['arg3'];
$arg4 = $_GET['arg4'];
$arg5 = $_GET['arg5'];
$subject = $arg1 ;
$errorMessage = $arg2;
$ErrorData = $arg3;
$ErrorSource = $arg4;
$ErrorStackTrace = $arg5;
$recipients = "myemail";
$from = "errorreport@user.com" ;
$headers = array (
'From' => $from,
'To' => $recipients,
'Subject' => $subject,
);
$body = "ErrorMessage: "."\n".$errorMessage."\n"."ErrorData: "."\n".$ErrorData."\n"."ErrorSource: "."\n".$ErrorSource."\n"."ErrorStackTrace: "."\n".$ErrorStackTrace;
$mail_object =& Mail::factory('smtp',
array(
'host' => 'prwebmail',
'auth' => true,
'username' => 'user',
'password' => 'pass', ));
$mail_object->send($recipients, $headers, $body);
?>