Can anybody please tell me maximum subject length java mail support?

Hi All,

I am trying to send mail with around7000 characters subject length but SMTP server is not sending it successfully. I am also not getting any error/ exception while calling Transport.send(Message) method.

1) Can you Please tell me maximum length that smtp support?

2) How to find it?

3) Is It depend on SMTP host or other proerties?

Thanks,

Jasmin

[408 byte] By [jasmin4s7a] at [2007-11-26 13:34:18]
# 1

I don't know what the answer to your question is. But let me suggest that trying to use a subject line of that length is pointless, as no e-mail client is going to display the whole thing to the recipient anyway. Perhaps you should rethink your design and put all that information in the body of the message.

DrClapa at 2007-7-7 22:15:45 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2

There's a limit to the length of lines in the SMTP protocol,

but JavaMail should split the Subject line into continuation

lines so that shouldn't be a problem. Still, creating a header

line that long is just asking for trouble. You're much more

likely to run into server bugs or other limitations. As the other

poster suggested, put the data in the message body, not in the

Subject header.

bshannona at 2007-7-7 22:15:45 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...