jangosmtp 0.1.1 → 0.1.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.
data/.gitignore CHANGED
@@ -1,6 +1,7 @@
1
1
  *.gem
2
2
  *.rbc
3
3
  *.tmproj
4
+ .idea
4
5
  .bundle
5
6
  .config
6
7
  .yardoc
data/README.md CHANGED
@@ -61,6 +61,7 @@ Create a group and return the successfull value
61
61
  ### Send an email using group name
62
62
  Send an email and get/create a requested group
63
63
  `group_name`: group name that the user wants the email to be applied to, should only contain alphanumeric ( and spaces ) will be cleaned if an incorrect name is used
64
+ `subject`: the subject of the email to be sent
64
65
  `to_email`: the single email address that the email will be sent to
65
66
  `from_email`: the email address that the email will be coming from
66
67
  `from_name`: the name that the email address will be coming from
@@ -68,17 +69,18 @@ Send an email and get/create a requested group
68
69
 
69
70
  ___IMPORTANT___: This function will attempt to get or create a group for each email that is sent. If you will be sending a lot of emails to the same group I would recommend you create the group first and use the `send_email_with_group_id` function since that takes a group_id and won't attempt to create the group with each email that is sent
70
71
 
71
- send_email( group_name, to_email, from_email, from_name, html )
72
+ send_email( group_name, subject, to_email, from_email, from_name, html )
72
73
 
73
74
  ### Send an email using group id
74
75
  Send an email using a pre-existing group
75
76
  `group_id`: the id of the group that this email will be applied to
77
+ `subject`: the subject of the email to be sent
76
78
  `to_email`: the single email address that the email will be sent to
77
79
  `from_email`: the email address that the email will be coming from
78
80
  `from_name`: the name that the email address will be coming from
79
81
  `html`: the html of the email message to be sent
80
82
 
81
- send_email_with_group_id( group_id, to_email, from_email, from_name, html )
83
+ send_email_with_group_id( group_id, subject, to_email, from_email, from_name, html )
82
84
 
83
85
  ## Contributing
84
86
 
@@ -76,6 +76,7 @@ module Jangosmtp
76
76
  # Send an email and get/create a requested group
77
77
  # group_name: group name that the user wants the email to be applied to, should only contain alphanumeric
78
78
  # ( and spaces ) will be cleaned if an incorrect name is used
79
+ # subject: the subject of the email to be sent
79
80
  # to_email: the single email address that the email will be sent to
80
81
  # from_email: the email address that the email will be coming from
81
82
  # from_name: the name that the email address will be coming from
@@ -85,30 +86,30 @@ module Jangosmtp
85
86
  # be sending a lot of emails to the same group I would recommend you create the group first and use
86
87
  # the send_email_with_group_id function since that takes a group_id and won't attempt to create the
87
88
  # group with each email that is sent
88
- def send_email( group_name, to_email, from_email, from_name, html )
89
+ def send_email( group_name, subject, to_email, from_email, from_name, html )
89
90
  check_user_pass
90
91
  group_id = get_create_group( group_name )
91
92
  unless group_id.nil?
92
- return send_email_with_group_id( group_id, to_email, from_email, from_name, html )
93
+ return send_email_with_group_id( group_id, subject, to_email, from_email, from_name, html )
93
94
  end
94
95
  end
95
96
 
96
97
  # Send an email using a pre-existing group
97
98
  # group_id: the id of the group that this email will be applied to
99
+ # subject: the subject of the email to be sent
98
100
  # to_email: the single email address that the email will be sent to
99
101
  # from_email: the email address that the email will be coming from
100
102
  # from_name: the name that the email address will be coming from
101
103
  # html: the html of the email message to be sent
102
- def send_email_with_group_id( group_id, to_email, from_email, from_name, html )
104
+ def send_email_with_group_id( group_id, subject, to_email, from_email, from_name, html )
103
105
  check_user_pass
104
- # Send the email using Jango
105
106
  options = {
106
107
  'Username' => @username,
107
108
  'Password' => @password,
108
109
  'FromEmail' => from_email,
109
110
  'FromName' => from_name,
110
111
  'ToEmailAddress' => to_email,
111
- 'Subject' => 'SOCO Authorization Request',
112
+ 'Subject' => subject,
112
113
  'MessagePlain' => 'auto-generate',
113
114
  'MessageHTML' => html,
114
115
  'Options' => 'OpenTrack=' + @open_tracking.to_s + ',ClickTrack=' + @click_tracking.to_s + ',TransactionalGroupID=' + group_id
@@ -1,3 +1,3 @@
1
1
  module Jangosmtp
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jangosmtp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-03-21 00:00:00.000000000 Z
12
+ date: 2012-03-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: mechanize
@@ -62,7 +62,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
62
62
  version: '0'
63
63
  requirements: []
64
64
  rubyforge_project:
65
- rubygems_version: 1.8.19
65
+ rubygems_version: 1.8.21
66
66
  signing_key:
67
67
  specification_version: 3
68
68
  summary: Will encapsulate all the necessary api calls into an easy to use gem.