troubleshooting Question

Using mailx and sending attachments

Avatar of Chitra91
Chitra91 asked on
System Programming
3 Comments1 Solution10616 ViewsLast Modified:
Hi,

All that I am doing is (on my HPUX command prompt)
>mailx -m -s "hi" validemailid@somedomain.com

After I press enter ,it then stops for the email body. I type hello and then CTRL-D and come out. Why is the mail not sent to the above email id. Is there some setting or something or is the command wrong?

Also I will be sending 2 attachments with the mail using uuencode. The existing script sends 1. I need to modify the code to send two attachments. How do I modify the below statement.
uuencode FNAME.gz FNAME.gz |mailx -m -r ${SENDER} -s "$JOBNAME Results" ${EMAIL_ID}

I have also read in the manpages that ~(tildas) are ignored if -r is used or else I could have used
~! < command .

Well I am working on someone else's code and a newbie with Unix, so trying to figure out why i can't mail using mailx as i need to test the rest of the part too.

Thanks & Regards
CS
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 3 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros