Page 1 of 1

mail() problem

Posted: Mon Apr 23, 2007 8:56 am
by aetoc
I'm trying to send a mail() with a var in the body of the message bigger than 1024 characters nut the message that arrives stops in the 1024th character.

Is there anyone how knows a way to bypass this?

Thanks in advanced.

Posted: Mon Apr 23, 2007 9:15 am
by feyd
Use a mailing client helper like Swift.

Re: mail() problem

Posted: Mon Apr 23, 2007 9:56 am
by Chris Corbyn
aetoc wrote:I'm trying to send a mail() with a var in the body of the message bigger than 1024 characters nut the message that arrives stops in the 1024th character.

Is there anyone how knows a way to bypass this?

Thanks in advanced.
QP encode the message. Sadly there aren't any built in functions to do this in PHP, but as per ~feyd's suggestion you could force QP encoding of a message by doing this:

Code: Select all

$message->setEncoding("QP");
This assumes you have read the documentation.

On second thoughts, you can always base64 encode the message and send it with mail() since base64_encode() exists in PHP.