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
104
votes
10 answers

How can I send an email through the UNIX mailx command?

How can I send an email through the UNIX mailx command?
user269484
  • 1,093
  • 2
  • 9
  • 5
47
votes
8 answers

How to set the From email address for mailx command?

I am working on a KornShell (ksh) script running on a Solaris server that will send out an email when and error condition is met. I am sending the email via mailx. Question: How do I set the "From" email address on the mailx command? Current…
AieshaDot
  • 785
  • 3
  • 7
  • 13
32
votes
6 answers

Mailx send html message

I want to send a html message with Mailx. When I try the following command mailx -s "Subject" user@gmail.com < email.html I get the content of email.html in plain text. In the message the header Content-Type is set to text/plain. The -a option…
user3580716
  • 323
  • 1
  • 3
  • 6
22
votes
4 answers

mutt command with multiple attachments in single mail unix

My requirement is to attach all the .csv files in a folder and send them in a single mail. Here is what have tried, mutt -s "subject" -a *.csv -- abc@gmail.com < subject.txt The above command is not working (It's not recognizing multiple files) and…
Mariappan Subramanian
  • 9,527
  • 8
  • 32
  • 33
21
votes
9 answers

Linux configuration -- ssmtp: Cannot open smtp.gmail.com:587

Hi I have RHEL5 with ssmtp installed on it ssmtp-2.61-22.el5.i386.rpm my /etc/ssmtp/ssmtp.conf updated as below…
Chandramani
  • 343
  • 1
  • 2
  • 9
21
votes
2 answers

Mailx and Gmail nss config dir

I am trying to send mail from a Linux command line using the mailx command. I can send from my local domain no problem but I want to set up mail to send from my Gmail account as well as receive mail sent to my Gmail account. After configuring my…
Jeff
  • 674
  • 1
  • 5
  • 17
16
votes
5 answers

linux mail < file.log has Content-Type: application/octet-stream (a noname attachment in Gmail)

I've been using mail -s "here is a log file" "person@example.com" < log/logfile.log Which used to come through with headers: User-Agent: Heirloom mailx 12.4 7/29/08 MIME-Version: 1.0 Content-Type: text/plain;…
KCD
  • 9,873
  • 5
  • 66
  • 75
13
votes
6 answers

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…
Oh Chin Boon
  • 23,028
  • 51
  • 143
  • 215
13
votes
5 answers

how to send an email via mailx with enclosed file

I need to sent a file via mailx or mail, but I wat to sent it as attachment not in the body message. Is there any way how to do it ? Eventually is there any other tool in solaris which can be used for such as procedure ? Thanks
slafik
  • 319
  • 2
  • 3
  • 6
11
votes
2 answers

Sending email with CC BCC and sender's address in unix mailx

I want to send email from HP unix using mailx command. I have to include cc and bcc in my email and have to use the specific email address as the sender. But -r (which is to define the sender's email address) will disalbe ~ commands so if i have to…
Kyaw Lwin Phyo
  • 121
  • 1
  • 1
  • 6
8
votes
1 answer

why does mailx ignore header fields?

I want to send an HTML email. have a plain text file that looks like this: From: "name" To: name@email.com Subject: First Email MIME-Version: 1.0 Content-Type: text/html; charset=us-ascii Content-Disposition:…
Trevor Hickey
  • 36,288
  • 32
  • 162
  • 271
7
votes
1 answer

Difference between mailx and sendmail?

What is the difference between mailx and sendmail? Which one is the most efficient(Performance standpoint) to send emails?
MukeshKoshyM
  • 514
  • 1
  • 8
  • 16
6
votes
2 answers

Read lines from File in Bash and parse words into variables for mailx parameters

I have a bash script which reads lines from a text file with 4 columns(no headers). The number of lines can be a maximum of 4 lines or less. The words in each line are separated by SPACE character. ab@from.com xyz@to.com;abc@to.com Sub1 …
Shon
  • 71
  • 1
  • 3
6
votes
3 answers

mailx: "send-mail: illegal option -- a" while attempting to send file attachment

Our production server has been retired and now we are using a hosted system running Redhat GNU/Linux. We had many scripts using mutt to send file attachments but they're failing now since mutt is not installed on our servers (The sysadmin policy is…
user2773648
  • 117
  • 1
  • 2
  • 8
6
votes
2 answers

Parse mail's body using mailx and bash scripting

I am trying to automate certain part of my work using emails.Is there any method already available using mailx and bash which I can use to extract mail's body?
Rajat Saxena
  • 3,834
  • 5
  • 45
  • 63
1
2 3
15 16