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
Expand Up @@ -31,38 +31,38 @@ module Protocols
# Simple SMTP client
#
# @example
# email = EM::Protocols::SmtpClient.send(
# :domain=>"example.com",
# :host=>'localhost',
# :port=>25, # optional, defaults 25
# :starttls=>true, # use ssl
# :from=>"sender@example.com",
# :to=> ["to_1@example.com", "to_2@example.com"],
# :header=> {"Subject" => "This is a subject line"},
# :body=> "This is the body of the email"
# )
# email.callback{
# puts 'Email sent!'
# }
# email.errback{ |e|
# puts 'Email failed!'
# }
# email = EM::Protocols::SmtpClient.send(
# :domain=>"example.com",
# :host=>'localhost',
# :port=>25, # optional, defaults 25
# :starttls=>true, # use ssl
# :from=>"sender@example.com",
# :to=> ["to_1@example.com", "to_2@example.com"],
# :header=> {"Subject" => "This is a subject line"},
# :body=> "This is the body of the email"
# )
# email.callback{
# puts 'Email sent!'
# }
# email.errback{ |e|
# puts 'Email failed!'
# }
#
# Sending generated emails (using mailfactory)
#
# mail = MailFactory.new
# mail.to = 'someone@site.co'
# mail.from = 'me@site.com'
# mail.subject = 'hi!'
# mail.text = 'hello world'
# mail.html = '<h1>hello world</h1>'
# mail = MailFactory.new
# mail.to = 'someone@site.co'
# mail.from = 'me@site.com'
# mail.subject = 'hi!'
# mail.text = 'hello world'
# mail.html = '<h1>hello world</h1>'
#
# email = EM::P::SmtpClient.send(
# :domain=>'site.com',
# :from=>mail.from,
# :to=>mail.to,
# :content=>"#{mail.to_s}\r\n.\r\n"
# )
# email = EM::P::SmtpClient.send(
# :domain=>'site.com',
# :from=>mail.from,
# :to=>mail.to,
# :content=>"#{mail.to_s}\r\n.\r\n"
# )
#
class SmtpClient < Connection
include EventMachine::Deferrable
Expand Down

0 comments on commit 7b774d8

Please sign in to comment.