easy_smtp 0.3.1 → 0.3.2

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/easy_smtp/smtp.rb +5 -3
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '085d105f1752b3f6a0dab1c3107fc15ae443397ab32f5a76039c406bacef6e29'
4
- data.tar.gz: 9c475f06f9afbe6fdcd6bb72ae3bedc818126fc85a4238d6d20dff75ed9b0bd6
3
+ metadata.gz: 360d0f68b19505c57d8499655f5ee4e4b76ba339117d57cf960cf9b58f2d2c0f
4
+ data.tar.gz: 75b997f58bcc6e75d698799a2f10a98dfe2db67222b85aec9e7563b599a3d602
5
5
  SHA512:
6
- metadata.gz: d3e31dd073680318f8ce857e50e2c63553a6a7cb21fb6875261411724a280d3ab68425eb7500e1b68c90c68db38c5e51780748765def999ae43c3519b40f1536
7
- data.tar.gz: de1b793f2686497098eb39353dc8dfa860675c1a05a5ac756f91207710def0a855e32675cf808801009f77916d68aa253e5a4330929d6ccf3c6598593a63fb1d
6
+ metadata.gz: 759c6e53b5e78f1c3b799e3f88e74f2cdd433dae4b205834acadc6ff7cdd1cefa965b2503b9f6d85f34bc1285020c8ecf3ba8ae26045003cdab74ed75cce4d20
7
+ data.tar.gz: b52c60f86a3afeed131461e2757fd22f8b532cbf6dd8d3eabf4a82b240de5bf1840b545646b706a59aa1c2098fd7c853d8840929a3ea9136f9dd4b9ce3a1709e
@@ -9,12 +9,14 @@ module EasySMTP
9
9
  # from_address: 'fromaddress@mydomain.com',
10
10
  # subject: 'Subject of this email',
11
11
  # body: 'Content of the email!',
12
- # html_body: '<html><head></head><body>Content of the email in HTML format!</body></html>',
12
+ # html_body: '<html><head></head><body>Content of the email in HTML format!</body></html>', # (optional)
13
13
  # attachments: ['Array of paths to files']
14
+ # server: smtp.somedomain.com, # (optionally override config)
15
+ # port: 25, # (optionally override config)
14
16
  # }
15
17
  def send_email(email_data)
16
- smtp_server = EasySMTP.config['smtp']['server']
17
- smtp_port = EasySMTP.config['smtp']['port']
18
+ smtp_server = email_data['server'] || EasySMTP.config['smtp']['server']
19
+ smtp_port = email_data['port'] || EasySMTP.config['smtp']['port']
18
20
  raise "SMTP server missing from config. Add the entry to the #{EasySMTP.config.path} \"smtp\": { \"server\": \"hostname_or_ip\" }" if smtp_server.nil? || smtp_server.empty?
19
21
 
20
22
  email_data = Hashly.stringify_all_keys(email_data.dup)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: easy_smtp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Munoz