cancel
Showing results for 
Search instead for 
Did you mean: 

mailx and lotus notes

SILVERSTAR
Frequent Advisor

mailx and lotus notes

Hi,

i send a mail from a ux box containing a body text and two attachements.
The first one arrives correctly the second one do not arrives but i see some characters realted to it:
begin 664 LISTQTSA.txt <;'-C:&EA=F]N94!A

If I send the same mail to may hotmail box I am able to see both of them correctly.

The command I use is the folowing:
{ echo 'MLST=|LISTQTSA.txt|';echo 'ID=|QR000388549|';echo 'BC=|QTSA|';echo 'OFRMT=|Pdf|';echo 'KEEPBODY';echo 'SUBJ=|Ns.miglior off
erta n. QR000388549 del 18/02/2008 per S.R.L.|';echo 'FROM=||';echo 'ORIENTATION=|Landscape|';echo '@@##EndOfParameterSect
ion##@@';uuencode ../SPF/MAILQTSA_LP_01_01_P3920301 MAILQTSA.txt;uuencode ../DAT/OCGOML38_08022114374011 LISTQTSA.txt;} |mailx -m -s
'QR000388549 del 18/02/2008' gwfax@box.com

I send the two file saparately one per time, the arrive correctly.
I send them togheter but without -m, and i saw the original error.
I try to use ux2dos before uunecoding, same error.

Did you know any hint ?

Thanks
Angelo
8 REPLIES
TTr
Honored Contributor

Re: mailx and lotus notes

You append the encoded attachments back to back and that is your problem.

There should be another section filename and type information for the SECOND attachment between the two uuencode statements.
Without it the mail reader does not know there is a second attachment. What you see as "begin 644..." is the encoded piece of the second attachment appearing as text in the mail message. Without the header information before it, the mail reader can not decode it. You still can decode the second attachment but you have to do it manually (save it to a file and run uudecode)
SILVERSTAR
Frequent Advisor

Re: mailx and lotus notes

Hi,

so wich is the section I should put between the to uuencode command.

Consider that the following:
echo 'MLST=|LISTQTSA.txt|';echo 'ID=|QR000388549|';echo 'BC=|QTSA|';echo 'OFRMT=|Pdf|';echo 'KEEPBODY';echo 'SUBJ=|Ns.miglior off
erta n. QR000388549 del 18/02/2008 per S.R.L.|';echo 'FROM=||';echo 'ORIENTATION=|Landscape|';echo '@@##EndOfParameterSect
ion##@@'
is used to format the printer/fax server which receive the two files.

Thanks
Angelo
TTr
Honored Contributor

Re: mailx and lotus notes

I don't know the exact fax server format or what the fax capabilities are but I do know that in a mail message with 2 attachments, you must have something like

echo statements for first attachment
uuencode of first attachment
echo statements for second attachment
uuencode of second attachment

Based on your commands I would try something like this but you have to verify your fax server syntax.

{
echo 'MLST=|LISTQTSA.txt|';
echo 'ID=|QR000388549|';
echo 'BC=|QTSA|';
echo 'OFRMT=|Pdf|';
echo 'KEEPBODY';
echo 'SUBJ=|Ns.miglior offerta n. QR000388549 del 18/02/2008 per S.R.L.|';
echo 'FROM=||';
echo 'ORIENTATION=|Landscape|';
echo '@@##EndOfParameterSection##@@';
uuencode ../SPF/MAILQTSA_LP_01_01_P3920301 MAILQTSA.txt;
echo 'MLST=|LISTQTSA.txt|';
echo 'ID=|QR000388549|';
echo 'BC=|QTSA|';
echo 'OFRMT=|Pdf|';
echo 'KEEPBODY';
echo 'SUBJ=|Ns.miglior offerta n. QR000388549 del 18/02/2008 per S.R.L.|';
echo 'FROM=||';
echo 'ORIENTATION=|Landscape|';
echo '@@##EndOfParameterSection##@@';
uuencode ../DAT/OCGOML38_08022114374011 LISTQTSA.txt;
} |mailx -m -s 'QR000388549 del 18/02/2008' gwfax@box.com
SILVERSTAR
Frequent Advisor

Re: mailx and lotus notes

Hello,

I try but the result is the same the second file does not arrive.

I also try with the following one but I get the same issue:

export EMAIL_TO=my@mail.com
export EMAIL_FROM=server
export EMAIL_SUBJECT='000388549 del 18/02/2008'
export EMAIL_BODY=' '
export FILE_NAME=' '
export ATTACHED_FILE=' '

echo "To: $EMAIL_TO" > soggetto
echo "From: $EMAIL_FROM" >> soggetto
echo "Subject: $EMAIL_SUBJECT" >> soggetto
echo "MIME-Version: 1.0" >> soggetto
echo 'Content-type: multipart/mixed; boundary="xxxxyyyzzqzzyyyxxxx"' >> soggetto
echo '--xxxxyyyzzqzzyyyxxxx'>> soggetto
echo "" >> soggetto

echo 'MLST=|LISTQTSA.txt|' >> soggetto
echo 'ID=|QR000388549|' >> soggetto
echo 'OFRMT=|Pdf|'>> soggetto
echo 'KEEPBODY'>> soggetto
echo 'SUBJ=|Ns.miglior offerta n. QR000388549 del 18/02/2008 per FATROTEK S.R.L.|'>> soggetto
echo 'FROM=||'>> soggetto
echo 'ORIENTATION=|Landscape|'>> soggetto
echo '@@##EndOfParameterSection##@@'>> soggetto

uuencode ../SPF/MAILQTSA_LP_01_01_P3920300 MAILQTSA.txt >> soggetto
echo "MIME-Version: 1.0" >> soggetto
echo 'Content-type: multipart/mixed; boundary="xxxxyyyzzqzzyyyxxxx"' >> soggetto
echo '--xxxxyyyzzqzzyyyxxxx'>> soggetto
uuencode ../DAT/OCGOML38_08022114055588 LISTQTSA.txt >> soggetto

cat soggetto |/usr/sbin/sendmail -t



thanks
Angelo
TTr
Honored Contributor

Re: mailx and lotus notes

Unfortunately I don't have any faxservers here, all the attachment facts I provided are from a mail reader perspective. Mair readers are capable of detecting multiple attachments in the mail message and the only way they can do that is by having these "headers" before the encoded body of each attachment.
Look in the faxserver's documentation in case you find some information about this.

Or may someone else has faxserver experience.

What is the faxserver software you are using?
SILVERSTAR
Frequent Advisor

Re: mailx and lotus notes

Hi,

the fax server I think has no importance at this point, the mails arrive corrupted at the lotus notes mailbox. This means that before lotus notes send the files to the fax server they are already corrupted such as I have described above.

regards.
Angelo

TTr
Honored Contributor

Re: mailx and lotus notes

OK I see. There are additional headers needed to indicate the "Content-Type".

But rather than spending time trying to construct the headers manually each time you should try an mailer program that can email files as attachments on a commad line. Two commonly used such programs are "mutt" and "mpack" and are available for HP-UX on the HP-UX porting and archive site
http://hpux.cs.utah.edu/hppd/hpux/Networking/Mail/mutt-1.5.17/

You don't need to specify headers, these prgrams create the headers and and encode the files. (mutt has runtime dependancies, it needs other software installed)


Search on this list for sending attachments in batch
SILVERSTAR
Frequent Advisor

Re: mailx and lotus notes

Lotus Notes admin is looking for a fix on its side.