Skip to main content

Questions tagged [mailx]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
236 views

Cannot relay thru gmail using mailx and ssmpt on buster pi0. Works on stretch/jessie pi3B,+ using heirloom-mailx

raspberry pi0w with buster, mailx [mail-utils} and ssmtp pointed to gmail relay at smtp.gmail.com:587 [using 2FA key] pi0w syslog shows successful connection executing "mailx --debug-level=3 ........
user322035's user avatar
0 votes
1 answer
668 views

Ubuntu: How do i get the same version of mailx as everyone else?

Apparently there are multiple different versions of mailx. Among the numerous differenes is that all tutorials I can find state that you need the "-a" option to attach files, while my version of mailx ...
jov14's user avatar
  • 65
0 votes
1 answer
2k views

Can I use sendmail instead of mailx in unattended-upgrades?

I've configured unattended-upgrades for apt to upgrade automatically and setup sendmail with a gmail account I made for it. Now I want unattended-upgrades to use sendmail to send me an email with the ...
douira's user avatar
  • 131
0 votes
0 answers
480 views

how to send an image in the body of the mail using any of the mail utilities in Linux

How can we send an image in the body of a mail with rich text / HTML. I tried to get from few of the links , but i am not able to get complete solution. I tried below code but no luck mpack -s "...
Arya's user avatar
  • 119
1 vote
2 answers
387 views

Delete emails from specific source in mailx/BSD mail

I need to delete all emails from a specific source. I can list all of the emails with the f [email protected] but I'm having to dump it to something like awk and back into mail... or copy all of ...
MrSchism's user avatar
0 votes
1 answer
1k views

Can send an email using a bash script called by crontab but not by a Jenkins job

I installed and configured a mail client: sudo apt-get install heirloom-mailx sudo vi /etc/ssmtp/ssmtp.conf mailhub=smtp.mail.yahoo.com:587 FromLineOverride=YES [email protected] AuthPass=...
Stephane's user avatar
  • 195
3 votes
1 answer
2k views

Get cronjob Email alert only on errors, not for other stdout?

I have a cron job that runs a script.sh file (Which takes the backup of DB), and sends me an email every hour. In script.sh file, I'm taking backup of few databases(.sql file), then creating .zip of ...
Ash's user avatar
  • 97
0 votes
1 answer
1k views

Working with CSV file to send mail

I have a CSV file on a linux host, and it has 2 columns separated by commas: 1st column is email address and second column is corporate email address. The second column(corp email) could be one OR ...
Patrick Guerrier's user avatar
1 vote
0 answers
1k views

Linux - extract information from email and write to file

Using bash mailx or any other programs, would be a way to extract information from an email box and to write the specific information to a file? Anyone has a clue about this, I have bunch of emails ...
Svan's user avatar
  • 11
1 vote
1 answer
5k views

To print values in diferent line in mail body shell script

Below is the code to print contents of files present in the directory File contents are : apple banana grapes mango names=() FILES=/path_to_dir/* for f in $FILES do names+=($f) done ...
user's user avatar
  • 209
5 votes
1 answer
6k views

View list of messages in mail/mailx

Using mail (mailx), how does one refresh the list of messages, as it appears immediately upon starting the program? After I run a command to view a particular message, I cannot reload the list (except ...
Jellicle's user avatar
  • 2,304
5 votes
2 answers
4k views

How can i set a default account in Heirloom-mailx?

How can i set a default account in Heirloom-mailx? I have defined an account in /etc/nail.rc that is usable via mail -A accountname but i'd like to set this account to be used by default so i can ...
kioopi's user avatar
  • 173
1 vote
3 answers
2k views

cron table mailx caused empty content

I'm using centos 7.0/6.5. The content of /etc/cron.hourly/mail.cron #!/bin/sh log=/var/log/mail.cron.log echo "`hostname` `date`" >> $log 2>&1 mailx -s "test mail" [email protected] < $...
Daniel YC Lin's user avatar
0 votes
1 answer
6k views

Mailx is is not working

I have been trying to send emails throw Linux using echo "hi abhijeet2" | mailx -v Admin [email protected] Whic works fine on other linux system ,but not working my system. I have tried to ...
abhijeet's user avatar
  • 123
0 votes
1 answer
746 views

How to encrypt the mail in unix?

I want to encrypt the mail as that will be containing the confidential information. There are no attachments. Please help in providing the steps to encrypt the mail. I have got the reference of How ...
Pooja25's user avatar
  • 23
5 votes
5 answers
23k views

Need to set mailx variable to specify the From address

Running Oracle Linux 5.8 (which is just re-branded RedHat EL 5.8) I must change the From address. But we have scripts that use mailx which cannot be re-written to use any extra flags, so I'd like to ...
SlowBro's user avatar
  • 59
3 votes
1 answer
17k views

Sending email through Gmail with mailx gives error "Send options without primary recipient specified"

I am trying to send an email with a Bash script with my Gmail account using mailx. I have the following code in the script: mailx -v -s "$SUBJECT" -S smtp-use-starttls -S ssl-verify=ignore -S ...
user1049697's user avatar
3 votes
0 answers
1k views

Sending text messages from Raspberry Pi via email fails

I'm using mailx on my raspberry pi to try to send text messages updates for event monitoring. My phone number:9876543210 My phone's email-to-text gateway address: [email protected] I can Send ...
physicsmichael's user avatar
2 votes
3 answers
3k views

Cron job outputs HTML; how to send mail as HTML

I have a cron job that if it fails outputs HTML. If it succeeds it outputs nothing, in which case I get no mail. If it does fail and write HTML, cron sends me the mail but it comes as plain text and ...
John Zwinck's user avatar
1 vote
3 answers
23k views

sending mail from linux commad line

Is it possible to send mail from linux terminal to any gmail account. If possible then what are the configuration are needed. I tried with mailx and sendmail but its not working. I also tried with ...
max's user avatar
  • 4,123
11 votes
1 answer
7k views

How do you open mailx to read old mail when you have no new mail and view a list of old emails?

If you type mailx at the command line when you have new mail, it nicely shows you headers of your new mail and leaves you at a ? prompt where you can do mail commands. But if you don't have new mail ...
mring's user avatar
  • 1,077
1 vote
1 answer
6k views

mailx is not sending any mail

I'm new to super user and I am trying to teach myself how to code bash and work my way around the GNU/Linux operating system. I've become pretty comfortable with vim, emacs and some basic commands but ...
Andrew's user avatar
  • 11
3 votes
2 answers
5k views

mailx read attachments

Arch Linux x86 Heirloom mailx From what I know, the mailx utility is supposed to read and send email. I somehow got it to work with sending and receiving mail with a gmail account, also using ...
kaykun's user avatar
  • 173
37 votes
5 answers
214k views

Does mailx send mail using an SMTP relay or does it directly connect to the target SMTP server?

Suppose i send a mail using the following the following command: mailx [email protected] then does mailx first try to find out the SMTP server of my ISP for relaying the mail or does it connect directly. ...
Rohit Banga's user avatar
  • 2,474
1 vote
2 answers
2k views

Mailx doesn't send mail

I'm having issues sending mail on a Debian (Lenny) box using mailx. root@deity:/# mail root Subject: Hai Hi, root! . Cc: - root@deity:/# mail No mail for root Does anyone have an idea what might ...
FRKT's user avatar
  • 231