Operating System - HP-UX
1823143 Members
3442 Online
109647 Solutions
New Discussion юеВ

Adding message into the body of an email using ux2dos command.

 
SOLVED
Go to solution
Manuales
Super Advisor

Adding message into the body of an email using ux2dos command.

with the following instruction i can send an email without telling something into the body of the message ..

ux2dos ${log}/09_print_manifest_all | uuencode HW_REPORT_PRINT_MANIFEST.doc | mailx -m -s "HW servers Report - $hour " $emails

how can i do for using the same sintax but adding a message into the body of the message ...
i need to add the content of the file named servers_without_ignite_installed


please let me know .... thanks :0)
4 REPLIES 4
Steven Schweda
Honored Contributor
Solution

Re: Adding message into the body of an email using ux2dos command.

Please do a Google search for:

mpack mime

Then get the program, read the documentation,
learn how to use it, and stop asking the same
questions about e-mail with attachments over
and over and over...
Arturo Galbiati
Esteemed Contributor

Re: Adding message into the body of an email using ux2dos command.

Hi,

mail -t $emails <Subject: "HW servers Report - $hour "

$(ux2dos ${log}/09_print_manifest_all | uuencode HW_REPORT_PRINT_MANIFEST.doc)
END_OF_MAIL

See man mail to be sure about option.
Now I'm not having access and may be I bad remember.
HTH,
Art
OldSchool
Honored Contributor

Re: Adding message into the body of an email using ux2dos command.

if it is in the body of the email, i don't think you need to use either ux2dos or uuencode.

just get the text in the file you're sending..
Ernesto Cappello
Trusted Contributor

Re: Adding message into the body of an email using ux2dos command.

Hi Manuales, I use the following script:

---------------------------
#!/bin/csh -f

setenv SUBJECT "Email subject on `/bin/date +%d-%m-%Y`"
setenv EMAIL_ADDRESS "name1.surname1@company.com,name2.surname2@company.com"

setenv BODY "This is the Email Body."
setenv ATTACHED_FILE "/tmp/export.csv"
setenv ATTACHED_FILE_AS "/tmp/export_2.csv"


/bin/echo "Best" > "$ATTACHED_FILE_AS"
/bin/echo "Regards," >> "$ATTACHED_FILE_AS"
/bin/echo "Ernesto." >> "$ATTACHED_FILE_AS"

/bin/uuencode "$ATTACHED_FILE" export.csv >> "$ATTACHED_FILE_AS"
/bin/mailx -s "$SUBJECT" "$EMAIL_ADDRESS" < "$ATTACHED_FILE_AS"

/bin/rm "$ATTACHED_FILE_AS"
---------------------------

Best regards.
Ernesto