Viewing 1 to 4 of 4 items
Tag Archives: Send Email

Sending simple message body + file attachment using Linux Mailx

I am writing a shell script to send an email using Linux Mailx, the email must contain a file attachment and a message body. Currently sending an email with an attachment: output.txt | mail -s “Daily Monitoring” james@dell.com I wish to add a message body. How should i? Linux Mailx: mail [-eIinv] [-a header] [-b addr] [-c addr] [-s subj] to-addr  Full Article…

0

How do I send email from a Sun System (use mailx)?

#!/bin/sh # # Purpose: Demonstrate how to send an email from UNIX using mailx. ############################################################ # Example 1 – Simple: echo “This is the body.”| mailx -s “mailx Test1” jsmith@abc.com # Example 2 – Using Variables: SUBJECT=”mailx Test2″ EMAIL_ADDRESS=”jsmith@abc.com” BODY=”This is the body of the message.” echo “$BODY” | mailx -s “$SUBJECT” “$EMAIL_ADDRESS” # Example 3  Full Article…

0