Emacs mail mode copy sent messages - email

In Mail-mode (C-x m) how can I get a copy of sent messages saved in my IMAP Sent folder? I am using msmtp to send mail. I have the Arch Linux msmtp-mta package installed so that it can use the sendmail command as an alias to msmtp. In my init.el I have (setq mail-user-agent 'sendmail-user-agent). I'm not sure if I need to configure Emacs or something on my mail server in order to get a copy of sent messages saved.

Related

How to store decrypted sent messages with mutt + pgp?

I'm using mutt with PGP and would like to store sent messsages in a corresponding IMAP folder. Problem: When I send an encrypted email to somebody, mutt copies the encrypted email to the sent folder, instead of an unencrypted version. Of course, since it is encrypted with the receivers key, I cannot unencrypt this message anymore, making it useless.
Is there a setting in mutt to fix this?
The setting you ask for is set fcc_clear=yes. This will save it in cleartext to the Sent folder (see man muttrc for full explanation).
There was a question to the opposite on superuser, so I'll extend my answer to that for a full picture.
Depending on where your "Sent" folder resides, either in a remote IMAP server you want to have fulltext search for (probably need cleartext), or on a local disk that is encrypted at-rest, you have further options:
mutt currently has pgp_self_encrypt in tandem with pgp_default_key (added to mutt on 2017-05-29 / 2018-01-15, so check your version) to control the behaviour
gnupg has an encrypt-to <keyid> option, but I would prefer the mutt config
neomutt has encrypt-to-self

Is it possible to send a email through Batch file

Is it possible to send an email through a batch command line? I have a password batch file for a folder and when you fail three attempts i want it to send me an email. I know its possible to download ans install a program off the internet but when I would open the program it would close. So is there a command or program that sends and email through batch?
TakeCommand will enable all kinds of commandline-magic, including sending of mail. Alkternatively, if you have a local install of PHP (and properly set it up), you could write a PHP-Script to send mail and launch the PHP-Interpreter (in your batch) to execute that file.

Configuring Gmail in gnus in Aquamacs

I'm a new emacs user, and I'm trying to get gnus working with mi gmail account with Aquamacs.
So far, I've been able to set it up to receive my mail. The problem is when I try to send an e-mail. I get this error:
No Gnus is good news
No more unread newsgroups
Mark set
Sending...
Sending via mail...
No STARTTLS program was available (tried 'gnutls-cli')
ad-Orig-error: Sending failed; SMTP protocol error
I understand that 'gnutls-cli' is necessary, and that it is not included in Aquamacs. I've found this guide to install it http://www.gnu.org/s/gnutls/manual/gnutls.html, but I'm not sure how I have to proceed, since I'm using MacOs and not Linux (although both are UNIX OS)
My question is: what do I exactly have to do to be able to send emails?
You could install opensll and configure Gnus to use it instead of
gnus-tls.
From the Gnus Manual:
`nntp-open-ssl-stream'
Opens a connection to a server over a "secure" channel. To use
this you must have OpenSSL (http://www.openssl.org) or SSLeay
(ftp://ftp.psy.uq.oz.au/pub/Crypto/SSL) installed. You then
define a server as follows:
;; "snews" is port 563 and is predefined in our `/etc/services'
;; however, `openssl s_client -port' doesn't like named ports.
;;
(nntp "snews.bar.com"
(nntp-open-connection-function nntp-open-ssl-stream)
(nntp-port-number 563)
(nntp-address "snews.bar.com"))

Mail Not Sending from My Server

I am having issues sending mail from my server, when I type in phpinfo() I get this:
Mail: /var/spool/mail/frank
...
_ENV["MAIL"]: /var/spool/mail/frank
The php file that I'm using the Mail function in is owned by Apache and has 775 permissions. Inside /var/spool/mail there is no apache file, but there is a file for every other user on the box. Do I need to change the php.ini? Or can I add in an apache file (perhaps duplicate the frank file and then rename)?
Any advice can help!
/var/spool/mail is where incoming unread mail is stored. There would be an 'apache' file only if the apache account has received mail.
Have you looked inside the MTA's log (usually /var/log/maillog) to see what's going on? If PHP's properly sending mail, there should be an entry in there for the mail being en-queued and what happened when the MTA (postfix/sendmail/exim/etc...) tries to forward it onwards.

failing while sending bug email in emacs

C-cC-c,get this info:
Sending...terminated by signal: Broken pipe
I find paste a long file in text mode is wrong(GUI version is OK),
and want to send a bug email.
what should i config? sending mail in emacs is cool!
thanks!
Emacs uses the /usr/sbin/sendmail command (specified by the sendmail-program variable) to deliver email you compose. You might be getting the error because your sendmail command is not working properly.
To resolve the issue you could try using the sendmail command directly (try man sendmail) to verify it really works. If it doesn't work properly, you should fix it and sending email from Emacs should start working.