File: //usr/local/rvm/gems/ruby-2.7.4/doc/mail-2.7.1/ri/Mail/SMTPConnection/cdesc-SMTPConnection.ri
U:RDoc::NormalClass[iI"SMTPConnection:ETI"Mail::SMTPConnection;TI"Object;To:RDoc::Markup::Document:@parts[o;;[S:RDoc::Markup::Heading:
leveli: textI"Sending Email with SMTP;To:RDoc::Markup::BlankLine o:RDoc::Markup::Paragraph;[I"TMail allows you to send emails using an open SMTP connection. This is done by ;TI"Tpassing a created Net::SMTP object. This way we can get better performance to ;TI"Qour local mail server by reducing the number of connections at any one time.;T@S; ;
i;I")Sending via SMTP server on Localhost;T@o;
;[I"MTo send mail open a connection with Net::Smtp using any options you like;TS; ;
i;I"Delivering the email;T@o;
;[I"DOnce you have the settings right, sending the email is done by:;T@o:RDoc::Markup::Verbatim;[I"Fsmtp_conn = Net::SMTP.start(settings[:address], settings[:port])
;TI"Mail.defaults do
;TI"F delivery_method :smtp_connection, { :connection => smtp_conn }
;TI" end
;TI"
;TI"Mail.deliver do
;TI"$ to 'mikel@test.lindsaar.net'
;TI"$ from 'ada@test.lindsaar.net'
;TI"" subject 'testing sendmail'
;TI" body 'testing sendmail'
;TI" end
;T:@format0o;
;[I",Or by calling deliver on a Mail message;T@o;;[
I"mail = Mail.new do
;TI"$ to 'mikel@test.lindsaar.net'
;TI"$ from 'ada@test.lindsaar.net'
;TI"" subject 'testing sendmail'
;TI" body 'testing sendmail'
;TI" end
;TI"
;TI"mail.deliver!;T;0:
@fileI"9lib/mail/network/delivery_methods/smtp_connection.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[[
I"
settings;TI"RW;T:publicFI"9lib/mail/network/delivery_methods/smtp_connection.rb;T[
I" smtp;T@>;F@?[ [ [[I"
class;T[[;[[I"new;T@?[:protected[ [:private[ [I"
instance;T[[;[[I"
deliver!;T@?[;[ [;[[I"dot_stuff;T@?[ [U:RDoc::Context::Section[i 0o;;[ ;0;0[@:I" Mail;TcRDoc::NormalModule