1753371 Members
4845 Online
108792 Solutions
New Discussion

Re: Email Subject

 
pk1974
Occasional Contributor

Email Subject

Hi
I want to place content of the file as Email Subject

I have created a file abc.txt attached please check,

I am using the below command in the script

elm -s "${email_subject:?} $( "${email_recipients[@]:?}" < "${input_file:?}"

from the file it taking the first line
I want to place all lines from the file

1 REPLY 1
VK2COT
Honored Contributor

Re: Email Subject

Hello,

I would strongly advise you against such setup. Although the RFCs do not specifically deal with Subject: line limits,
there are many references to it:

Old RFC 822:

" 3.4.8. FOLDING LONG HEADER FIELDS

Each header field may be represented on
exactly one line consisting of the name of
the field and its body, and terminated
by a CRLF; this is what the parser sees.
For readability, the field-body portion of
long header fields may be "folded" onto
multiple lines of the actual field.
"Long" is commonly interpreted to mean
greater than 65 or 72 characters.
The former length serves as a limit, when
the message is to be viewed on most simple
terminals which use simple display software;
however, the limit is not imposed by this
standard."

Several years ago, RFCs 821 and 822 were
superceeded by 2821 and 2822.

Excerpt from RFC 2822:

"There are two limits that this standard
places on the number of characters in a
line. Each line of characters MUST be no
more than 998 characters, and SHOULD be no
more than 78 characters, excluding the CRLF."

Note that for database purposes, one can
define field as 'line' with multiple
occurences.

Subject line is not structured (it
falls under paragraph 2.2.1):

"2.2.1. Unstructured Header Field Bodies

Some field bodies in this standard are
defined simply as "unstructured" (which is
specified below as any US-ASCII characters,
except for CR and LF) with no further
restrictions. These are referred to as
unstructured field bodies. Semantically,
unstructured field bodies are simply to be
treated as a single line of characters
with no further processing (except for
header "folding" and "unfolding" as described in section 2.2.3)."

Note that log of Mail User Agents impose
their own limits.

If I remember correctly (I do not deal with Microsoft products much), Outlook has
a limit of 78 characters for Subject: line.

Take a look. I sent myself two messages:
one to my Fedora 10 and one to my (sadly)
Microsoft Outlook mailbox.

Fedora 10 message:

Subject: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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