Jump to content

Problem with e-mail output


brandt

Recommended Posts

I have an e-mail script setup which outputs links depending on what options someone selects from a web form. Lately, I have been seeing junk output coming from my variable. For instance, one of the links that is outputted displays in the e-mail as:

 

http://files.myd!%0a+omain.com/pdf/document1.pdf

 

It is inserting the !%0a+ from somewhere and I cannot figure out where.

 

I have a form where people can select multiple checkboxes to select files they want:

 

$msg  =($_POST['item1'])?"<a href=\"".$path2pdf."document1.pdf\">Download 1 here</a><br>":"";
$msg .=($_POST['item2'])?"<a href=\"".$path2pdf."document2.pdf\">Download 2 here</a><br>":"";

 

and so on...

 

$path2pdf is simply set to http://files.mydomain.com/

 

I have tested it via an echo and it outputs the message perfectly fine. The error only appears in the email itself. I have tested this with a variety of e-mail clients. What could be causing this? Thank you in advance.

Link to comment
Share on other sites

Are you sending any headers with the mail? If so, what are they? If they're wrong they can sometimes make weird things happen. It seems strange that it was working and now it's not though... Do you know if anything has been changed on your server?

 

Link to comment
Share on other sites

I am not sure about things changing on our server. My header is as follows:

 

$headers = "From: $recipient\r\n"; 
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
mail($to, $subject, $msg, $headers);

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.