Mail Archives: djgpp/2002/10/17/02:06:16
On Wed, 16 Oct 2002, Martin Steuer wrote:
> Ok, this works but I knew it won't be that easy. I think feedmail now
> executes /bin/mail (which I dont have). I want to set up this to another
> commandline-mailer.
Which mailer? I have a version of feedmail.el that supports Blat, a PD
command-line mailer for Windows. If that's what you want, I can just
send you the code (which I'm using for quite some time).
> The problem is I know nothing about ELisp (shame on
> me). What do I have to do in this section:
>
> (defun feedmail-buffer-to-binmail (prepped errors-to addr-listoid)
> "Function which actually calls /bin/mail as a subprocess.
> Feeds the buffer to it."
> (set-buffer prepped)
> (apply
> 'call-process-region
> (append (list (point-min) (point-max) shell-file-name nil errors-to nil
> shell- command-switch
> (format feedmail-binmail-template
> (mapconcat 'identity addr-listoid " "))))))
You need to customize the variable feedmail-binmail-template so that it
names your command-line mailer and any optional arguments it needs to
receive from Emacs. The doc string of feedmail-binmail-template should
explain the details.
Note that in general it's not a good idea to invoke subprograms via the
shell, since COMMAND.COM has too many limitations (such as too short
command-line length limit) that will bite you further down the road. For
starters, typical lists of addressees can easily overflow the 126
characters COMMAND.COM allows you. That's why I needed to hack
feedmail.el rather than simply customize feedmail-binmail-template.
- Raw text -