Gnus development mailing list
 help / color / mirror / Atom feed
* smtpmail embedded into fedmail
@ 2011-07-03 12:55 Adrian Lanz
  2011-07-03 13:11 ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 5+ messages in thread
From: Adrian Lanz @ 2011-07-03 12:55 UTC (permalink / raw)
  To: ding

For historical reasons I have smtp mail sending embedded into
feedmail. To make the system work with the new smtpmail, I need the
following hack. Reasonable? My concern: are potential failures in
sending the messages out with smtpmail still reported after my change tp
smtpmail?


*** /usr/share/emacs/24.0.50/lisp/mail/smtpmail.el.gz
--- /emacs/lisp/gnus/smtpmail.el
***************
*** 807,813 ****
  	    ;; DATA end "."
  	    (smtpmail-command-or-throw process ".")
  	    ;; Return success.
! 	    nil))
        (when (and process
  		 (buffer-live-p process-buffer))
  	(with-current-buffer (process-buffer process)
--- 807,813 ----
  	    ;; DATA end "."
  	    (smtpmail-command-or-throw process ".")
  	    ;; Return success.
! 	    t))
        (when (and process
  		 (buffer-live-p process-buffer))
  	(with-current-buffer (process-buffer process)




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: smtpmail embedded into fedmail
  2011-07-03 12:55 smtpmail embedded into fedmail Adrian Lanz
@ 2011-07-03 13:11 ` Lars Magne Ingebrigtsen
  2011-07-03 14:35   ` Adrian Lanz
  0 siblings, 1 reply; 5+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-07-03 13:11 UTC (permalink / raw)
  To: Adrian Lanz; +Cc: ding

Adrian Lanz <lanz@wsl.ch> writes:

> *** /usr/share/emacs/24.0.50/lisp/mail/smtpmail.el.gz
> --- /emacs/lisp/gnus/smtpmail.el
> ***************
> *** 807,813 ****
>   	    ;; DATA end "."
>   	    (smtpmail-command-or-throw process ".")
>   	    ;; Return success.
> ! 	    nil))
>         (when (and process
>   		 (buffer-live-p process-buffer))
>   	(with-current-buffer (process-buffer process)
> --- 807,813 ----
>   	    ;; DATA end "."
>   	    (smtpmail-command-or-throw process ".")
>   	    ;; Return success.
> ! 	    t))
>         (when (and process
>   		 (buffer-live-p process-buffer))
>   	(with-current-buffer (process-buffer process)

No, that's wrong.  A non-nil return value means that sending failed...

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: smtpmail embedded into fedmail
  2011-07-03 13:11 ` Lars Magne Ingebrigtsen
@ 2011-07-03 14:35   ` Adrian Lanz
  2011-07-03 20:06     ` Lars Magne Ingebrigtsen
  2011-07-03 20:10     ` Lars Magne Ingebrigtsen
  0 siblings, 2 replies; 5+ messages in thread
From: Adrian Lanz @ 2011-07-03 14:35 UTC (permalink / raw)
  To: ding

>>>>> On Sun, 03 Jul 2011 15:11:13 +0200
>>>>> Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

    > No, that's wrong.  A non-nil return value means that sending
    > failed...

Thanks!!! But, is this new? Because when smtpmail-via-smtp returns a nil
value after successful sending via smtp protocol, feedmail seems to
write out an error message?! Below the relevant part within feedmail? Is
this the "I will fear no evil" thingy?

Adrian.

(defun feedmail-buffer-to-smtpmail (prepped errors-to addr-listoid)
  "Function which actually calls `smtpmail-via-smtp' to send buffer as e-mail."
  ;; I'm not sure smtpmail.el is careful about the following
  ;; return value, but it also uses it internally, so I will fear
  ;; no evil.
  (feedmail-say-debug ">in-> feedmail-buffer-to-smtpmail %s" addr-listoid)
  (require 'smtpmail)
  (if (not (smtpmail-via-smtp addr-listoid prepped))
      (progn
	(set-buffer errors-to)
	(insert "Send via smtpmail failed.  Probable SMTP protocol error.\n")
	(insert "Look for details below or in the *Messages* buffer.\n\n")

[...]





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: smtpmail embedded into fedmail
  2011-07-03 14:35   ` Adrian Lanz
@ 2011-07-03 20:06     ` Lars Magne Ingebrigtsen
  2011-07-03 20:10     ` Lars Magne Ingebrigtsen
  1 sibling, 0 replies; 5+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-07-03 20:06 UTC (permalink / raw)
  To: ding

Adrian Lanz <lanz@wsl.ch> writes:

> Thanks!!! But, is this new? Because when smtpmail-via-smtp returns a nil
> value after successful sending via smtp protocol,

Yes, `smtpmail-via-smtp' has reversed its return value so that it could
return an error message when it failed.  I didn't know that any other
libraries used that function directly.

I'm not sure what's the right way to fix this -- redo the return value,
or fix feedmail.el to use the new value?

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: smtpmail embedded into fedmail
  2011-07-03 14:35   ` Adrian Lanz
  2011-07-03 20:06     ` Lars Magne Ingebrigtsen
@ 2011-07-03 20:10     ` Lars Magne Ingebrigtsen
  1 sibling, 0 replies; 5+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-07-03 20:10 UTC (permalink / raw)
  To: Adrian Lanz; +Cc: ding

I fixed feedmail.el instead of touching smtpmail.el again.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-07-03 20:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-03 12:55 smtpmail embedded into fedmail Adrian Lanz
2011-07-03 13:11 ` Lars Magne Ingebrigtsen
2011-07-03 14:35   ` Adrian Lanz
2011-07-03 20:06     ` Lars Magne Ingebrigtsen
2011-07-03 20:10     ` Lars Magne Ingebrigtsen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).