mail() problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
aetoc
Forum Commoner
Posts: 37
Joined: Tue Jan 31, 2006 2:48 am

mail() problem

Post 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.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Use a mailing client helper like Swift.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Re: mail() problem

Post 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.
Post Reply