Jump to content

Recommended Posts

Hey guys. I'm having a problem with my code and I can not seem to understand what's wrong.. My suspicion is that the $string gets too big or something.. but I'm not quite sure.

 

$subject = $_GET['sub'];
$message = explode("|", $_GET['msg']);

$sendto = "email";
$sendfrom = "email";
foreach($message as $user){
$user = explode(":", $user);
$activity1 = base64_decode($user[0]);
$activity2 = base64_decode($user[1]);
$activity0 = base64_decode($user[2]);
$string .= "Activity0: " . $activity0 . "<br>" . "Activity1: " . $activity1. "<br>" . "Activity2: " . $activity2 . "<br>- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<br>";
}
if($subject && $activity1 && $activity2 && $activity0){
	$header = 'Content-type: text/html; charset=iso-8859-1' . "\r\n" . 'From: ' . $sendfrom . "\r\n";
        mail($sendto, $subject, "<html>" . "<center>" . "<br><br><br>" . " - - - " . "Program logged this activity" . " - - - " . "<br>" . $string . "<br>" . "<b> - meh -</br></center></html>", $header);
} else {
echo "Failed?";
}

 

 

So the main point is that a program sends the required information to the php script and it proceeds by splitting it up and showing it in an organized way.. and then sends it to an email. This works flawless until some point where the message gets too big(?) and it'll do

 else {
echo "Failed?";
}

instead... Do you guys have any idea what's wrong?

 

 

Thanks in advance. :D

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.