Project

General

Profile

Feature #5373

SMTP - new method

Added by art.lussos (art lussos) about 6 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Target version:
[ruby-core:39742]

Description

I would like to add the following method to smtp.rb command dispatcher section.

The reset command tells the mail server that the current mail transaction should be aborted.

def reset
getok('RSET')
end

net.smtp.rb.rset.patch (1.35 KB) net.smtp.rb.rset.patch drbrain (Eric Hodel), 05/08/2012 08:31 AM

Associated revisions

Revision 39729
Added by drbrain (Eric Hodel) over 4 years ago

  • lib/net/smtp.rb: Added Net::SMTP#rset method to implement the SMTP RSET command. [ruby-trunk - Feature #5373]
  • NEWS: ditto.
  • test/net/smtp/test_smtp.rb: Test for the above.

Revision 39729
Added by drbrain (Eric Hodel) over 4 years ago

  • lib/net/smtp.rb: Added Net::SMTP#rset method to implement the SMTP RSET command. [ruby-trunk - Feature #5373]
  • NEWS: ditto.
  • test/net/smtp/test_smtp.rb: Test for the above.

Revision 39729
Added by drbrain (Eric Hodel) over 4 years ago

  • lib/net/smtp.rb: Added Net::SMTP#rset method to implement the SMTP RSET command. [ruby-trunk - Feature #5373]
  • NEWS: ditto.
  • test/net/smtp/test_smtp.rb: Test for the above.

Revision 39729
Added by drbrain (Eric Hodel) over 4 years ago

  • lib/net/smtp.rb: Added Net::SMTP#rset method to implement the SMTP RSET command. [ruby-trunk - Feature #5373]
  • NEWS: ditto.
  • test/net/smtp/test_smtp.rb: Test for the above.

History

#1 [ruby-core:43718] Updated by mame (Yusuke Endoh) over 5 years ago

  • Status changed from Open to Assigned
  • Assignee set to aamine (Minero Aoki)

#2 [ruby-core:44554] Updated by mame (Yusuke Endoh) over 5 years ago

  • Status changed from Assigned to Feedback

Could you please create a test?

--
Yusuke Endoh mame@tsg.ne.jp

#3 [ruby-core:44927] Updated by drbrain (Eric Hodel) over 5 years ago

Here is a patch with a test, may I commit?

There aren't many net/smtp tests so perhaps there is a better way than FakeSocket.

#4 [ruby-core:44928] Updated by drbrain (Eric Hodel) over 5 years ago

  • Status changed from Feedback to Assigned

#5 [ruby-core:46155] Updated by drbrain (Eric Hodel) over 5 years ago

  • Category set to lib
  • Target version set to 2.0.0

May I apply this?

#6 [ruby-core:49290] Updated by shugo (Shugo Maeda) about 5 years ago

  • Assignee changed from aamine (Minero Aoki) to mame (Yusuke Endoh)

drbrain (Eric Hodel) wrote:

May I apply this?

Sasada-san told me that Aoki-san is neutral about this issue, and asked my take as a maintainer of Net::IMAP.

I think it's nice Net::SMTP to have a new method for the RSET command, but what do you think of it, Endo-san?

If permission is granted by Endo-san, there's one consideration about the method name.
The originally proposed method name is reset', but the method name in the Eric's patch isrset'.
I think `rset' is better, because other methods of Net::STMP have the same names as the SMTP command names.

#7 [ruby-core:49470] Updated by drbrain (Eric Hodel) about 5 years ago

I chose rset because it matches the other methods that follow the SMTP protocol in Net::SMTP like helo, ehlo, rcptto, mailfrom

#8 [ruby-core:49596] Updated by mame (Yusuke Endoh) about 5 years ago

  • Assignee changed from mame (Yusuke Endoh) to matz (Yukihiro Matsumoto)

I can't say anything but "no" because the deadline has passed.
So, don't ask me.

--
Yusuke Endoh mame@tsg.ne.jp

#9 [ruby-core:49969] Updated by mame (Yusuke Endoh) about 5 years ago

  • Target version changed from 2.0.0 to next minor

#10 [ruby-core:53129] Updated by drbrain (Eric Hodel) over 4 years ago

  • Assignee changed from matz (Yukihiro Matsumoto) to drbrain (Eric Hodel)

Since Aoki-san was listed as neutral last I asked, I will apply this sometime next week.

#11 Updated by drbrain (Eric Hodel) over 4 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r39729.
art , thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • lib/net/smtp.rb: Added Net::SMTP#rset method to implement the SMTP RSET command. [ruby-trunk - Feature #5373]
  • NEWS: ditto.
  • test/net/smtp/test_smtp.rb: Test for the above.

Also available in: Atom PDF