مراية لـ
https://github.com/postalserver/postal.git
تم المزامنة 2025-12-01 05:43:04 +00:00
@@ -58,6 +58,7 @@ module Postal
|
||||
# Set the source IP as appropriate
|
||||
smtp_client.source_address = ip_type == :aaaa ? @source_ip_address.ipv6 : @source_ip_address.ipv4
|
||||
end
|
||||
|
||||
case ssl_mode
|
||||
when "Auto"
|
||||
smtp_client.enable_starttls_auto(self.class.ssl_context_without_verify)
|
||||
@@ -65,6 +66,9 @@ module Postal
|
||||
smtp_client.enable_starttls(self.class.ssl_context_with_verify)
|
||||
when "TLS"
|
||||
smtp_client.enable_tls(self.class.ssl_context_with_verify)
|
||||
else
|
||||
smtp_client.disable_starttls
|
||||
smtp_client.disable_tls
|
||||
end
|
||||
|
||||
smtp_client.start(@source_ip_address ? @source_ip_address.hostname : self.class.default_helo_hostname)
|
||||
|
||||
@@ -40,10 +40,24 @@ mail.html_part = Mail::Part.new do
|
||||
BODY
|
||||
end
|
||||
|
||||
# puts mail.to_s
|
||||
c = OpenSSL::SSL::SSLContext.new
|
||||
c.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
||||
|
||||
<<<<<<< Updated upstream
|
||||
Net::SMTP.start("127.0.0.1", 2525) do |smtp|
|
||||
smtp.send_message mail.to_s, mail.from.first, mail.to.first
|
||||
end
|
||||
=======
|
||||
1000.times.map do
|
||||
Thread.new do
|
||||
smtp = Net::SMTP.new("77.72.7.155", 25)
|
||||
# smtp.enable_starttls(c)
|
||||
smtp.disable_starttls
|
||||
smtp.start("localhost")
|
||||
smtp.send_message mail.to_s, mail.from.first, mail.to.first
|
||||
smtp.finish
|
||||
end
|
||||
end.each(&:join)
|
||||
>>>>>>> Stashed changes
|
||||
|
||||
puts "Sent"
|
||||
|
||||
المرجع في مشكلة جديدة
حظر مستخدم