mr_suleyman
21st September 2004, 13:33
Hello All,
I wonder that On program script Is there anyway to send email with attachments in Baan IV c3 on HPUX11i. If answer is yes , Which confugiration must be done in TOOLs or program script .

Thanks ...

mark_h
21st September 2004, 14:52
Does HPUX have mailx available? If so then the answer is yes - search the board for mailx and uuencode. Something like this - I played with mailx last week. Below is just a piece of the device driver I created.

Mark


cmd = "uuencode " & tmp.file1 & " " & spool.fileout & " >> " & tmp.file3
rc = shell(cmd, SHELL_NO_OUTPUT)

cmd = "mailx -s " & chr$(34) & strip$(email.subj) & chr$(34)
|CC fields
if not isspace(email.cc) then
cmd = cmd & " -c " & chr$(34) & strip$(email.cc) & chr$(34)
endif
cmd = cmd & " " & strip$(email.to)& "<" & tmp.file3
rc = shell(cmd, SHELL_NO_OUTPUT)

mr_suleyman
21st September 2004, 15:05
Thanks I will look it .

mark_h
21st September 2004, 15:20
Maybe mailx only works on Sun Solaris boxes. Uuencode is a program which converts a file into an encoded representation that can be sent by mail. This comes straight from the man pages on it. I am not sure how to describe it, but it basically adds a begin, the encoded report and then an end statement. When you send it through mailx these encoded reports come as attachments.

Mark

NPRao
21st September 2004, 19:09
Mark, its available on HP-UX.

Here is the syntax in simple form -

$ uuencode filename filename | mailx -s "Testing" nprao@baanboard.com

For multiple users, you can also use -

$ uuencode filename filename | mailx -s "Testing" nprao@baanboard.com, mark@baanboard.com

mark_h
21st September 2004, 21:03
Hmmm - looks like that one post was edited and changed. :)

Anyway - is there a way to do multiple reports at once with uuencode? I know I can do them one at a time, but was wondering if there was a way to do that in the command itself.

Thanks

Mark

NPRao
22nd September 2004, 02:56
is there a way to do multiple reports at once with uuencode?


$ (uuencode file1 file1; uuencode file2 file2) | mailx -m -s "Mail Testing Multiple File Attachments" mark@baanboard.com

popeye
2nd February 2005, 23:52
hi,
I am using the following command.

(uuencode 1.pdf 1.pdf; uuencode 2.pdf 2.pdf) | mailx -s "My files" abcd@company.com

Whenever I send it to yahoo, the second pdf file comes in as a text attachment.
But it works fine if I send it to my company email a/c or hotmail.

Please advice.
Thanks,
Popeye!

vahdani
3rd February 2005, 11:27
Hi all,

you should find "elm" on most HP systems. Follwing one liner sends a mail with two attachments test1.pdf and test2.pdf. Note: First call elm on its own as it must create a .elm directory in yyour home directory first

> echo "This is the body of mail\n[include test1.pdf application/octet-stream base64]\n[include test2.pdf application/octet-stream base64]"| elm -s "mail subject" "tom@xyz.com dick@abc.com harry@def.net"

popeye
3rd February 2005, 20:00
(echo " "; uuencode 1.pdf 1.pdf; echo " "; uuencode 2.pdf 2.pdf) | mailx -s "My files - YAHOO" abcd@yahoo.com

adding the " " makes it work.

Thanks,
popeye!