Jump to content

[SOLVED] problem w/ sending e-mail via php...


tbare

Recommended Posts

well, i got the sending e-mail part...

 

here's the problem:

 

i'm sending a URL (e.g. http://www.domain.com/play.php?file=blah%20blah.avi&title=blah%20blah)

 

problem is, somewhere on the e-mail send page, i'm losing everything after the first %20

 

<?php
// --- CONFIG PARAMETERS --- //
   $url = $_POST['url'];
   $custom_message = $_POST['custom_message'];
   $custom_message = stripslashes($custom_message);
   $email_recipient = $_POST['recipient_email'];
   $recipient_name = $_POST['recipient_name'];
   $email_sender = $_POST['sender_name'];
   $email_return_to = $_POST['sender_email'];
   $email_content_type = "text/html; charset=us-ascii";
   $email_client = "PHP/" . phpversion();


// --- DEFINE HEADERS --- //
   $email_header = "From: " . $email_return_to . "\r\n";
   $email_header .= "Reply-To: " . $email_return_to . "\r\n";
   $email_header .= "Return-Path: " . $email_return_to . "\r\n";
   $email_header .= "Content-type: " . $email_content_type . "\r\n";
   $email_header .= "X-Mailer: " . $email_client . "\r\n";



// --- SUBJECT AND CONTENTS --- //
   $email_subject = "$email_sender has sent you a link from wannafork.com";
   $email_contents = "<html>";
   $email_contents .= "<h2>Your friend ($email_sender) has sent you, $recipient_name, a link!</h2>";
   $email_contents .= "<br><b>Sender: </b>" . $email_sender;
   $email_contents .= "<br><b>link: </b>" . $url;
   $email_contents .= "<br><br><b>Message from </b>" . $email_sender;
   $email_contents .= ":<br>\n" . $custom_message;
   $email_contents .= "</html>";


// --- SEND MAIL --- //
$email_result = mail($email_recipient, $email_subject, $email_contents, $email_header);
if ($email_result) echo "Email has been sent!";
else echo "Email has failed!";
?>

 

where:

 

$url = http://www.domain.com/play.php?file=blah%20blah.avi&title=blah%20blah

 

any ideas?

Link to comment
Share on other sites

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.