TextArea wordWrap用于邮件

I'm using phpMailer in my project , and passing the message/body via a CHtml textArea.

However , long mails are not being send (or when I used just mail() , the message was empty)

Now , when I write a message in the code , with all is fine.

So fom that I conclude that the textArea is not breaking the lines (gets over 70) , I tried using word-wrap but it seems like not working.

Here's pat of my mailer:

$mail->WordWrap = 50;
$mail->Subject = ($_GET['subject']);
$mail->MsgHTML($_GET['message']);                                       
$mail->AddAddress(Person::model()->findByPk($id)->email);
$mail->Send();

and here is the textArea:

 <?php echo CHtml::textArea('message','message. . . ',array('id'=>'message','style'=>'text-align: right','cols'=>75)); ?>

Does anyone know where is the problem?

Thanks , Mark.

The message is not being passed via but from the textarea and via an HTTP GET request which probably is one of the problems since the total length of a GET request body is limited to 1024 characters.

The WordWrap addribut tells the mailer to break the body text at every nth character with a newline so you don't have to worry about that. Just make it a POST.

ok , problem solved.

Here's my new ajax:

$.ajax({
                            type: "POST",
                            data:{checked:checked,subject:subject,message:message},
                            url:"'.$url.'",
                            success:function(){window.location="index.php?r=person/admin"},                 
                    });

And in the controlle , i changed all the _GET to _POST