Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm stucked when I'm trying send an email, using Mutt, but evry times that I run the script it prompt an menu with an verification. There is any way to bypass that verification or to inupt the option from the script without ask nothing?

#! /bin/bash

zip -r files.zip /home/user/folder/*.*
mutt -s "files[CONFIDENTIAL]" -a files.zip -- mail@mail.com
rm files.zip**strong text**
share|improve this question

migrated from stackoverflow.com Jun 7 '13 at 20:46

This question came from our site for professional and enthusiast programmers.

add comment

1 Answer 1

If you don't specify the body of the message in the command line, mutt will try to open your text editor so that you can enter it. If you specifically want to send an empty message, you can do it this way:

mutt -s "files[CONFIDENTIAL]" -a files.zip < /dev/null -- mail@mail.com

If it still shows a verification message, the problem may come from your .muttrc, and you may try the following:

mutt -s "files[CONFIDENTIAL]" -a files.zip -F /dev/null < /dev/null -- mail@mail.com

Unless your .muttrc defines a specific way of sending e-mail, for example if it contains something like:

set sendmail = "/usr/bin/msmtp -a you"

In this case, you may copy the interesting lines (all options that you want to use, such as set crypt_autoencrypt if your files are confidential) of your .muttrc into a separate configuration file, and replace -F /dev/null by -F ~/.yournewconfigurationfile.

Hope that helps!

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.