Skip to content

Commit

Permalink
Fix spacing on smtpclient doc examples
Browse files Browse the repository at this point in the history
  • Loading branch information
tmm1 committed Oct 20, 2011
1 parent 07fc8c7 commit 7b774d8
Showing 1 changed file with 28 additions and 28 deletions.
56 changes: 28 additions & 28 deletions lib/em/protocols/smtpclient.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -31,38 +31,38 @@ module Protocols
# Simple SMTP client # Simple SMTP client
# #
# @example # @example
# email = EM::Protocols::SmtpClient.send( # email = EM::Protocols::SmtpClient.send(
# :domain=>"example.com", # :domain=>"example.com",
# :host=>'localhost', # :host=>'localhost',
# :port=>25, # optional, defaults 25 # :port=>25, # optional, defaults 25
# :starttls=>true, # use ssl # :starttls=>true, # use ssl
# :from=>"sender@example.com", # :from=>"sender@example.com",
# :to=> ["to_1@example.com", "to_2@example.com"], # :to=> ["to_1@example.com", "to_2@example.com"],
# :header=> {"Subject" => "This is a subject line"}, # :header=> {"Subject" => "This is a subject line"},
# :body=> "This is the body of the email" # :body=> "This is the body of the email"
# ) # )
# email.callback{ # email.callback{
# puts 'Email sent!' # puts 'Email sent!'
# } # }
# email.errback{ |e| # email.errback{ |e|
# puts 'Email failed!' # puts 'Email failed!'
# } # }
# #
# Sending generated emails (using mailfactory) # Sending generated emails (using mailfactory)
# #
# mail = MailFactory.new # mail = MailFactory.new
# mail.to = 'someone@site.co' # mail.to = 'someone@site.co'
# mail.from = 'me@site.com' # mail.from = 'me@site.com'
# mail.subject = 'hi!' # mail.subject = 'hi!'
# mail.text = 'hello world' # mail.text = 'hello world'
# mail.html = '<h1>hello world</h1>' # mail.html = '<h1>hello world</h1>'
# #
# email = EM::P::SmtpClient.send( # email = EM::P::SmtpClient.send(
# :domain=>'site.com', # :domain=>'site.com',
# :from=>mail.from, # :from=>mail.from,
# :to=>mail.to, # :to=>mail.to,
# :content=>"#{mail.to_s}\r\n.\r\n" # :content=>"#{mail.to_s}\r\n.\r\n"
# ) # )
# #
class SmtpClient < Connection class SmtpClient < Connection
include EventMachine::Deferrable include EventMachine::Deferrable
Expand Down

0 comments on commit 7b774d8

Please sign in to comment.