Questions tagged [mailx]

Mailx is a unix mail processing system that provides sending and receiving facility.

Mailx is an intelligent mail processing system, which has a command syntax reminiscent of ed(1) with lines replaced by messages.

Attachments, cc and bcc are well supported with mailx command.

References

  1. Unix manpage
  2. Some examples
237 questions
0
votes
1 answer

Cronjob missing content from mail body, manually works fine

Edit: Solution found via Barmar's answer. Added full smartctl command path and it works via crontab now. I have the below script: #!/bin/bash #set…
Zippyduda
  • 107
  • 2
  • 7
  • 19
0
votes
1 answer

Sending mail with html file output as body

I'm receiving file hc.html as an attachment. But I wanted the output of hc.html as Body in Lotus Notes 8. I was using sendmail earlier and it was working fine for Outlook. In this new environment I cannot use sendmail. I can only use mailx. Can…
0
votes
1 answer

manipulate characters with mailx

I'm writing an email using mailx I wanted to know if it is possible to, lets say, underline some words, or making some words bold, or anything.. I have a file which carries the content of the mail content.txt content.txt: testing mail I'm using this…
hudac
  • 2,584
  • 6
  • 34
  • 57
0
votes
1 answer

lotus notes section from bash text file

I would like to be able to send a mail from unix/bash using mailx and cat( example: cat testMailWithSection.txt | mailx -s "testMail" -r "sender@machine" "destination@company" & however, it would be a long mail, and I'd like to put parts of it in…
ShadowFlame
  • 2,996
  • 5
  • 26
  • 40
0
votes
1 answer

Common Issue: Table to be displayed in mail content and not as an attachment

The requirement is to send a report from an UNIX server. I have a list of data to be shown on the report, let's say from database. I am using sendexchange to send mail. It always sends in plain text format, and the data isn't displayed with proper…
C0de_Hard
  • 72
  • 1
  • 9
0
votes
1 answer

Mailx with uuencode not sending multiple attachments with a proper email body on Suse Linux

This particular piece of code below worked correctly on AIX ( echo "mailbody"; uuencode a.txt 'arenamed.txt'; uuencode ab.txt 'abrenamed.txt'; uuencode abc.txt 'abcrenamed.txt'; uuencode abcd.txt 'abcdrenamed.txt'; ) | mailx -s "$subject"…
Prasoon
  • 425
  • 1
  • 6
  • 18
0
votes
1 answer

How do I embed ~< ! date within Unix Mailx message?

~! date would invoke the date command while mailx is in input mode. ~< ! date invokes the date command and would include the date within the mailx message. Hypothetically if I wanted to send a message with the date mailx -s "Test the date"…
user1316703
  • 71
  • 2
  • 3
  • 7
0
votes
1 answer

Mailing using Unix with error Files Attached

I have two Files (.csv) say File1.csv and File2.csv with 'INVALID' records, generated at the end of a Informatica Job. I am using below command to search for the file names 'INVALID', and then if either of the file has 'INVALID' records I have to…
0
votes
1 answer

Unable to send mail using mailx/mail from a host

On other hosts when I run something like: echo 'foo' | mail -s 'bar' user it sends the mail instantly and if i type mailq i am told it is empty. On this one host the mail command above runs but the mail is never received and if i type mailq i see…
Palace Chan
  • 8,845
  • 11
  • 41
  • 93
0
votes
3 answers

Attach one html file in an email using shell script

I am sending an email by using below commands by combining all the output and sending in one email. It works fine for me. mailx -s "LIP Data Quality Report for $DATE_YEST_FORMAT1" -r rj@host.com rj@host.com <
arsenal
  • 23,366
  • 85
  • 225
  • 331
0
votes
1 answer

How to check if Mailx used in the past timeframe?

I have a mailx statement as part of a shells scipt. It is part of a condtional statement that will send an email every minute if a system is failing. Is there a way to have mailx check if a mail was send in the last hour and only send if result is…
Rhys
  • 2,807
  • 8
  • 46
  • 68
0
votes
2 answers

Uuencode not attaching file to email and grep not listing file names

I've been trying to figure this out, but not matter what I try it doesn't seem to be working as I want. Basically the things that are missing is that grep is not listing the file names when it finds a match (which is what the -H flag is supposed to…
user707053
-1
votes
1 answer

Ubuntu mailx attach file without the whole path as the filename

I use the below command to send emails in an Ubuntu server. This seems to attach the testreport.csv file with its full path as the filename. echo "This email is a test email" | mailx -s 'Test subject' testemail@gmail.com -A…
suharsha
  • 95
  • 1
  • 3
  • 12
-1
votes
1 answer

Can't set From using mail command in bash

I am at my wits end.... All I want to do is set the From using a command line mail in a script. I have tried mutt, mail, mailx... Here is on command I tried: echo "Once again" | mail -s "Maybe this time" -A file.csv stevec@isonas.com -r 'John…
-1
votes
1 answer

BCC not working properly with mail command

I am attempting to send an e-mail to a recipient and bcc two other address using th e mail command. The issue is that the "-b " flag is not being read as such leading mail to try sending an e-mail to " -b someone@example.com ". The command is shown…
Chris
  • 1
  • 1
1 2 3
15
16