Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

A few days ago I asked about how I can secure email and many people advised me to use PGP tool, and I read about it and I use it.

Now I want to write a batch file to send encrypted email with attachments. I know how I can generate key, exchange key with other side and encrypt email with PGP mail but until now I don't know how I can integrate PGP tool with my mail and how I can send the encrypted email.

In other words, how can I send encrypted email that encrypts with PGP tool to other side by command line (batch file)?

share|improve this question
add comment

5 Answers

up vote 3 down vote accepted

Many clients support an extension for PGP. You could use Enigmail with Thunderbird for instance.

share|improve this answer
add comment

As an absolute last resort, you could install cygwin and then install mutt. You can do it all via a shell script (shell/bash also comes with cygwin).

See this thread for details: http://forums.gentoo.org/viewtopic-t-529419-start-0.html

** Note ** There is probably a much better (more Windows-native) way of doing this on your system since you aren't running *nix. But if no other alternatives come up, this approach should work.

share|improve this answer
add comment

If you can run Perl and PGP/GNUPG from the command line, then modifying part of this PGP Form Mail script may be of interest.

share|improve this answer
add comment

There are a number of GnuPG frontends recommended on the GPG homepage, including sections for network interfaces, scripting interfaces and Windows-specific sofware.

share|improve this answer
add comment

I was able to incorporate pgp into outlook 2007 using a combination of vbs and bat all together. It is a self contained folder. However, I was using pgp 6.5.8 to do this. The only issue with this process was it had extra space at the end of the CRLF. My work around was to attach the encrypted file to the MS outlook. Which was added in the script to attach the file automatically after it was encrypted. This script was built from ms dos and able to use in other email platforms.

.https://www.dropbox.com/s/jrper2dg0ij1j51/outlook_encrypt_pgp.bat

share|improve this answer
add comment

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.