turboSMTP 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/main/main.rb +35 -0
- metadata +44 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: fbbda7aaede5205e3af292a9979e308ef4471b0096c719203ee302d5bca249b0
|
|
4
|
+
data.tar.gz: 18bcff23c4c788c7ff0591d7b491e6419d5c7d78cf9fd38ce26e52e46113f74a
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 280ab8fdadf7df24e419186beb51dd98be49b71543cab72455b30db04769007fa88b4957b476f23082560cf83ad5396fecc3ad97c89094283eed57c0516e6ca8
|
|
7
|
+
data.tar.gz: 3e731695c36f286ee081f565910244459041d45e83ee919f37004eed181f64fe85b329f2da384e885c5d2da2ae65dc0c2566be566a469774423337c4461898df
|
data/main/main.rb
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# File: main.rb
|
|
2
|
+
|
|
3
|
+
require File.dirname(__FILE__) + '/mail'
|
|
4
|
+
require File.dirname(__FILE__) + '/turboAPIClient'
|
|
5
|
+
|
|
6
|
+
USERNAME = "username@turbo-smtp-com";
|
|
7
|
+
PASSWORD = "insertpasswordhere";
|
|
8
|
+
SERVER_URL = "https://api.turbo-smtp.com/api/mail/send";
|
|
9
|
+
FROM_MAIL_FIELD = "SENDER_MAIL_ADDRESS" #insert email "from" value
|
|
10
|
+
TO_MAIL_FIELD = "DESTINATION_MAIL_ADDRESS" #insert email "to" value
|
|
11
|
+
|
|
12
|
+
mail = Mail.new
|
|
13
|
+
mail.from = FROM_MAIL_FIELD
|
|
14
|
+
mail.to = TO_MAIL_FIELD
|
|
15
|
+
mail.subject = "Ruby Test TurboAPI Send(email) : campo SUBJECT"
|
|
16
|
+
mail.html_content = "Ruby Test TurboAPI Send(email) : campo HTML_CONTENT"
|
|
17
|
+
|
|
18
|
+
turboAPIClient = TurboAPIClient.new
|
|
19
|
+
begin
|
|
20
|
+
response = turboAPIClient.sendMail(USERNAME, PASSWORD, SERVER_URL, mail)
|
|
21
|
+
puts response
|
|
22
|
+
|
|
23
|
+
rescue RestClient::PreconditionFailed => error_var
|
|
24
|
+
puts "Il server ha restituito il seguente errore: #{error_var}"
|
|
25
|
+
puts "Verificare che username e password inseriti siano corretti"
|
|
26
|
+
puts "I valori inseriti sono --> USERNAME: #{USERNAME}, PASSWORD: #{PASSWORD}"
|
|
27
|
+
|
|
28
|
+
rescue RestClient::ResourceNotFound => error_var
|
|
29
|
+
puts "Error #{error_var}"
|
|
30
|
+
puts "Verificare che l'URL della risorsa richiesta sia corretto"
|
|
31
|
+
puts "L'URL inserito e' --> #{SERVER_URL}"
|
|
32
|
+
|
|
33
|
+
rescue Exception => error_var
|
|
34
|
+
puts "Error #{error_var}"
|
|
35
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: turboSMTP
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- turboSMTP
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: bin
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2020-03-31 00:00:00.000000000 Z
|
|
12
|
+
dependencies: []
|
|
13
|
+
description: Library for sending emails using turboSMTP
|
|
14
|
+
email: info@serversmtp.com
|
|
15
|
+
executables: []
|
|
16
|
+
extensions: []
|
|
17
|
+
extra_rdoc_files: []
|
|
18
|
+
files:
|
|
19
|
+
- main/main.rb
|
|
20
|
+
homepage: https://rubygems.org/gems/hola
|
|
21
|
+
licenses:
|
|
22
|
+
- MIT
|
|
23
|
+
metadata: {}
|
|
24
|
+
post_install_message:
|
|
25
|
+
rdoc_options: []
|
|
26
|
+
require_paths:
|
|
27
|
+
- lib
|
|
28
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
29
|
+
requirements:
|
|
30
|
+
- - ">="
|
|
31
|
+
- !ruby/object:Gem::Version
|
|
32
|
+
version: '0'
|
|
33
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
34
|
+
requirements:
|
|
35
|
+
- - ">="
|
|
36
|
+
- !ruby/object:Gem::Version
|
|
37
|
+
version: '0'
|
|
38
|
+
requirements: []
|
|
39
|
+
rubyforge_project:
|
|
40
|
+
rubygems_version: 2.7.6.2
|
|
41
|
+
signing_key:
|
|
42
|
+
specification_version: 4
|
|
43
|
+
summary: turboSMTP
|
|
44
|
+
test_files: []
|