Class: EventMachine::Protocols::SmtpClient
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
Connection
|
|
Instance Chain:
|
|
Inherits: |
EventMachine::Connection
|
Defined in: | lib/em/protocols/smtpclient.rb |
Overview
Simple SMTP client
Sending generated emails (using Mail)
mail = Mail.new do from 'alice@example.com' to 'bob@example.com' subject 'This is a test email' body 'Hello, world!' end
email = EM::P::SmtpClient.send( :domain=>'example.com', :from=>mail.from.first, :to=>mail.to, :message=>mail.to_s )
Constant Summary
Class Method Summary
- .new ⇒ SmtpClient constructor
-
.send(args = {})
:host
=> required String.
Connection
- Inherited
.new | Override .new so subclasses don't have to call super and can ignore connection-specific arguments. |
Instance Attribute Summary
- #args=(value) writeonly
Connection
- Inherited
#comm_inactivity_timeout | comm_inactivity_timeout returns the current value (float in seconds) of the inactivity-timeout property of network-connection and datagram-socket objects. |
#comm_inactivity_timeout= | Allows you to set the inactivity-timeout property for a network connection or datagram socket. |
#error? | Returns true if the connection is in an error state, false otherwise. |
#notify_readable= | Watches connection for readability. |
#notify_readable?, | |
#notify_writable= | Watches connection for writeability. |
#notify_writable? | Returns true if the connection is being watched for writability. |
#paused?, | |
#pending_connect_timeout | The duration after which a TCP connection in the connecting state will fail. |
#pending_connect_timeout= | Sets the duration after which a TCP connection in a connecting state will fail. |
#signature, #watch_only? |
Instance Method Summary
- #connection_completed Internal use only Internal use only
- #post_init Internal use only Internal use only
- #receive_line(ln) Internal use only Internal use only
-
#unbind
Internal use only
Internal use only
We can get here in a variety of ways, all of them being failures unless the @succeeded flag is set.
- #escape_leading_dots(s) private
-
#invoke_auth
private
Perform an authentication.
- #invoke_data private
- #invoke_ehlo_over_tls private
-
#invoke_error
private
We encountered an error from the server and will close the connection.
-
#invoke_internal_error(msg = "???")
private
We encountered an error on our side of the protocol and will close the connection.
- #invoke_mail_from private
- #invoke_rcpt_to private
- #invoke_starttls private
- #receive_auth_response private
- #receive_data_response private
- #receive_ehlo_over_tls_response private
- #receive_ehlo_response private
- #receive_mail_from_response private
- #receive_message_response private
- #receive_rcpt_to_response private
- #receive_signon private
- #receive_starttls_response private
- #send_ehlo private