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
2
votes
1 answer

Shell script to email results of SQLPlus query using Mailx in AIX

I have the commands that I need. If I execute these commands at the prompt, everything works as expected. SQLPlus runs the query, exports the result to a file and then Mailx emails that file to me. sqlplus username/pwd@instance SPOOL…
Nate
  • 2,035
  • 8
  • 23
  • 33
2
votes
1 answer

Add multiple SMTP email logins to mailx

I'm trying to set up multiple email accounts on mailx (one from gmail and one from office365). When I had just one it worked fine but if I try to add another, mailx will always use the SMTP details from the last defined server regardless of what…
Theo Michail
  • 157
  • 1
  • 1
  • 11
2
votes
2 answers

How to sent Email as HTML from bash script by using mail or mailx command (Centos/Redhat)

I am trying to sent an email from bash script which should have HTML table in body , I am using mail command in Redhat . but its keep sending me as Text file . difference=`expr $artu_removed - $artu_added` mail -s "Built notification"…
alammd
  • 339
  • 4
  • 14
2
votes
1 answer

Multiple html files in Email body

i have multiple csv files: I'm using this script to get html output: #!/usr/bin/python import pandas as pd import sys import json sys.stdout = open('output.html','wt') df = pd.read_csv('users.csv') print(df.to_html()) For other…
Milister
  • 648
  • 1
  • 15
  • 33
2
votes
0 answers

Heirloom mailx doesn't display UTF-8 characters

I'm using Heirloom mailx 12.5-2. When I'm receiving a mail with characters like "ä", "ö" or "ü" mailx can't display these and just shows "�". The mails charset is "iso-8859-1". I already tried to set the options "ttycharset", "sendcharsets" to…
night4awk
  • 51
  • 1
  • 7
2
votes
0 answers

KSH Script Formatting With Mailx

Alright, so I have been asked to help with this script. Basically what it needs to do is email a user if there is an error associated with an ID. Now I won't go into too much detail on that because the sql portion does that correctly. What I don't…
smurfguy
  • 45
  • 1
  • 6
2
votes
1 answer

Saving messages from mailx command line

Is there a way to save messages to a file using mailx, using only the command line? I know that I can copy messages to a file by first entering mailx: mailx -A my_account Then typing & c 1-10 first_ten_messages.txt Which would save the first 10…
Omar Wagih
  • 8,504
  • 7
  • 59
  • 75
2
votes
0 answers

use mailx to send mail, but cannot receive mail sometimes

my os is cent os 6.4, mailx is Heirloom Mail version 12.4 7/29/08. The mailx works fine before. But when I send 2 attachments which size is about 500kB in one mail , I cannot receive mail at most time. But if I tried again and again I may receive…
archer
  • 21
  • 3
2
votes
1 answer

How to send using with attachment and html body using mailx

I want to send an e-mail using mailx which has an attachment and HTML code on the body. Setting the Content-type to "text/html" mail comes with file binary content on the body instead of attached. echo "" >> $MAILFILE echo "" >> $MAILFILE echo…
Fabio Farath
  • 489
  • 6
  • 12
2
votes
2 answers

Sending email with HTML body and attachement with mailx

I'm currently using mailx to send html formated mails from my scripts : cat body.html | /usr/bin/mailx -a "From: Me " -a "Content-type: text/html" -s "My subject" $RECIPIENTS Now I'd like to add an attachement (png image) but I cannot…
user2683188
  • 31
  • 1
  • 2
2
votes
7 answers

Sending email attachment using uuencode and mailx

I'm trying to get a system on my home network to send an image (.png) via email. The closest I have gotten is this: uuencode -m snapshot.png snapshot.png | mailx -r "sending@myremoteserver.net" -s "Snapshot" -S smtp=smtp.myremoteserver.net…
user2646340
  • 33
  • 1
  • 1
  • 4
1
vote
1 answer

mailutils mailx sets "Content-Disposition: attachment" for attachment

I am using mailx to send regular e-mails. They have one attachment and a plain-text body. I am doing this like so: echo "Here is the data!" | mail -s "Your weekly report" -a "Content-Type: text/plain\; charset=\"utf-8\"" -a "From: Your beloved…
1
vote
0 answers

move mailx account to gmail

I would love to know how to move my mails from mailx in linux to gmail. Say I want to move to gmail for my domain, and move over all my emails to the gmail account. I wonder also are there any caveats? Cheers K
Ke.
  • 2,484
  • 8
  • 40
  • 78
1
vote
1 answer

How to pipe mailx Headers to external File. Always getting truncated

if the subject of a mail is a little longer then it is not possible to pipe it to any command or external file without getting truncated. Why? And how do you do it correctly? Example: mail -H -f mbox shows several mails. Everything looks OK. O 3…
user777946
  • 11
  • 2
1
vote
1 answer

mailx does not allow piping body text AND specifying a file attachment at the same time?

I am trying to set up an automized sending of notification mails at certain events. I want to pass a message body and attach a seperate log file. I can pass the body text with the following command: mymessage="test message\nwhatever\n" echo -e…
jov14
  • 139
  • 9
1 2
3
15 16