help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: batch mode to send an email


From: Kevin Rodgers
Subject: Re: batch mode to send an email
Date: Mon, 07 Aug 2006 17:25:10 -0600
User-agent: Thunderbird 1.5.0.5 (Windows/20060719)

ken wrote:
Kevin Rodgers wrote:

(setq send-mail-function 'smtpmail-send-it
      smtpmail-smtp-server "mail.server.tld")

(setq mail-default-headers
      "X-RTFM: Sending Mail; Mail Sending; (smtpmail)Emacs Speaks SMTP\n")

(mail nil "someuser@somewhere.somedomain" "my favorite subject")

(insert "Blah, blah, blah.\n")

(mail-send-and-exit)


Kevin,

Thanks very much for your reply.  But it didn't work.  All I did was
change the destination email address and the mail server to actual,
existing values.

The error I got was:

Wrong number of arguments: #[(arg)
("/usr/share/emacs/21.3/lisp/mail/sendmail.elc" . 21146) nil 2
("/usr/share/emacs/21.3/lisp/mail/sendmail.elc" . 20985) "P"], 0

(all on one line, of course.  My mail client autowraps.)

I commented out ''(mail nil ....)'' and the error went away.

"C-h f mail" says there can be more args, but doesn't say it must.  I'm
not certain how to fix this line.

Mail accepts anywhere between 0 and 7 arguments:

(mail &optional noerase to subject in-reply-to cc replybuffer actions)

The call above passes 3, so I can't imagine why it is complaining.

--
Kevin





reply via email to

[Prev in Thread] Current Thread [Next in Thread]