Forum Moderators: coopster

Message Too Old, No Replies

Content-Type Issue in E-mail Script

         

thx967

1:08 am on Jan 18, 2006 (gmt 0)

10+ Year Member



I have changed my Content-Type to be multilingual and I keep getting an error when sent

Here's the code i have in there

<code>
$headers = $headers ."Content-Type: text/plain; charset="GB2312" Content-Transfer-Encoding: 7bit"\n\n";
</code>

The error I'm getting back from that line is:

Parse error: parse error, unexpected T_STRING in /home/site/public_html/referafriend_submit.php on line 45

Anyone have any ideas on how i'm miscoding the above line of code?

jc_armor

5:23 am on Jan 18, 2006 (gmt 0)

10+ Year Member



your double-quotes inside your string is the problem.

try this one:

$headers = $headers .'Content-Type: text/plain; charset="GB2312" Content-Transfer-Encoding: 7bit"\n\n';

thx967

5:54 am on Jan 18, 2006 (gmt 0)

10+ Year Member



ok i changed my string to

<code>
$headers = $headers ."Content-Type: text/plain; charset= gb2312 Content-Transfer-Encoding: 64bit\n\n";
</code>

and the script works

however - my traditional chinese is'nt being displayed in the e-mail thats generated. I'm using the gb2312 charset.

Any ideas?

thx967

2:50 am on Jan 19, 2006 (gmt 0)

10+ Year Member



ok - one more change i've had to make with regard to the charset - its now traditional chinese "big5" and the content type to "Content-Type:text/html"from plain

<code>
$headers = $headers.'Content-Type:text/html; charset="big5" Content-Transfer-Encoding: 8bit'."\n\n";
</code>