BaanRal
4th December 2001, 00:46
Hi,

We have developed programs that calls a shell command to use mailx for sending baan report files from the server.

The report writes to the file (ASCIT Device). And the shell script grabs the file and sends out. EVerything works fine. But we are having problem in retaining the format of the report consistently.

The email looks good on Windows 2000 (Outlook) but the same email when viewed in windows NT the format is not retained.

Is there any way to retain uniform format while sending the emails.

Appreciate any comments.

BaanRal

~Vamsi
4th December 2001, 00:53
If your source file is "foo" then uuencode it to become foo.txt and then call mailx. This will make an attachment in the mail with foo.txt which can be opened with a text editor - usually notepad or wordpad and the formatting will be retained.

vgobiraj
4th December 2001, 19:01
Another option can be is to save the report as html and send the html as attachment.

BaanRal
14th December 2001, 18:30
Hi,

Thanks for the response. But wondering how do we send that as attachment. Mailx does not give the option to attach the file.

Thanks
BaanRal

vgobiraj
14th December 2001, 19:11
I don't know much ab't mailx

For me it was a NT server.I used a small java program to send email with the attachment

There are some sample programs from sun to send email. U
can modify it for ur requirements

http://java.sun.com/products/javamail/index.html

patvdv
14th December 2001, 19:19
You can do following:

# uuencode $FILE $FILE >$OUTPUT
# cat $OUTPUT| mailx -m -s $HEADER $ADRESSEE

The -m option should keep your file in the HTML format.

Ehabos
14th February 2002, 16:16
For more information, please see this thread (http://www.baanboard.com/baanboard/showthread.php?s=&threadid=1071)

ajay_vishal
15th November 2006, 21:00
Hi in the example :

cat $output|mailx -m -s $Header $Adressee


how do u define the values for $Header and $Adressee.

When I use command

cat "filename" | mailx -s "Subject string" -c "email Addresss code"

I receive a message that "The flags you gave make no sense since you are not sending mail".

Please suggest how can I send email using mailx command.

thanks,
Ajay Verma

ajay_vishal
15th November 2006, 21:09
Hi,

We have developed programs that calls a shell command to use mailx for sending baan report files from the server.

The report writes to the file (ASCIT Device). And the shell script grabs the file and sends out. EVerything works fine. But we are having problem in retaining the format of the report consistently.

The email looks good on Windows 2000 (Outlook) but the same email when viewed in windows NT the format is not retained.

Is there any way to retain uniform format while sending the emails.

Appreciate any comments.

BaanRal


Hi,
can u please give the code used to send attachment using mailx command. Thanks in advance.

regards,
ajay verma

mr_suleyman
16th November 2006, 08:38
This is mine sample

domain tcmcs.s200m mail.str

filename = "control.csv"
mail.str="uuencode "&filename&" "&filename & "|mailx -s ""MAIL SUBJECT"" "&"someone@mailaddress.com"
shell(mail.str,SHELL_BACKGROUND)



Good Luck !

ajay_vishal
1st December 2006, 23:58
Hi Suleyman,
thank you very much for your help. I have been able to send files as attachments via email.

thanks & regards,
Ajay Verma

RamSundar
28th February 2007, 00:59
When I use the above uuencode syntax my email looks like this and there is no attachment. Is there something I need to setup at the HP-Unix level for the uuencode to work? Thanks.
---------------------------------
begin 660 Openpo.html
M3U!%3B!055)#2$%312!/4D1%4E,@04Y$(%)%455%4U1%1"!215-#2$5$54Q%
M($)!4T5$($].(%)%455)4D5$($1!5$4*"E)%1BQ/4D1%4BQ03U,L251%32Q$
M15-#4DE05$E/3BQ$14Q)5D5262!$051%+$]014X@4519+%)%4T-(14153$4@
M34534T%'12Q215%525)%345.5"!$051%+%)%455)4D5$(%%462Q35$%455,*
M"B`Q,#<S-BPP,B\R-R\R,"PP+#<P,#`X,"PQ,"PQ,3$R,#=!,#`@("`@("`@
M+")"55-(24Y'("`@("`@("`@("`@("`@("`@("`@("`B+#`R+S(S+S(P+#,P
----------------------------------