vmail 2.8.1 → 2.8.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +2 -2
- data/lib/vmail/imap_client.rb +5 -2
- data/lib/vmail/inbox_poller.rb +4 -3
- data/lib/vmail/reply_templating.rb +2 -1
- data/lib/vmail/version.rb +1 -1
- metadata +2 -2
data/README.markdown
CHANGED
@@ -63,8 +63,8 @@ during execution (see below).
|
|
63
63
|
## Configuration file
|
64
64
|
|
65
65
|
To run Vmail, create a yaml file called `.vmailrc` and save it either in
|
66
|
-
~/.vmail/
|
67
|
-
Vmail will move the file to ~/.vmail/
|
66
|
+
~/.vmail/default/ or in your home directory. If you do the latter,
|
67
|
+
Vmail will move the file to ~/.vmail/default/ when it starts up.
|
68
68
|
|
69
69
|
The `.vmailrc` file should look something like this. Substitute your own values.
|
70
70
|
|
data/lib/vmail/imap_client.rb
CHANGED
@@ -29,6 +29,8 @@ module Vmail
|
|
29
29
|
|
30
30
|
def initialize(config)
|
31
31
|
@username, @password = config['username'], config['password']
|
32
|
+
#load user-specified value for from field
|
33
|
+
@from = config['from'] || config['username']
|
32
34
|
@name = config['name']
|
33
35
|
@signature = config['signature']
|
34
36
|
@signature_script = config['signature_script']
|
@@ -241,7 +243,7 @@ module Vmail
|
|
241
243
|
''
|
242
244
|
end
|
243
245
|
rescue
|
244
|
-
puts "VMAIL_ERROR: #{[$!.message, $!.backtrace].join("\n")}"
|
246
|
+
puts "VMAIL_ERROR: #{$!.class}\n#{[$!.message, $!.backtrace].join("\n")}"
|
245
247
|
end
|
246
248
|
|
247
249
|
# gets 100 messages prior to id
|
@@ -292,7 +294,8 @@ module Vmail
|
|
292
294
|
end
|
293
295
|
|
294
296
|
def new_message_template(subject = nil, append_signature = true)
|
295
|
-
|
297
|
+
#set from field to user-specified value
|
298
|
+
headers = {'from' => "#{@name} <#{@from}>",
|
296
299
|
'to' => nil,
|
297
300
|
'subject' => subject,
|
298
301
|
'cc' => @always_cc,
|
data/lib/vmail/inbox_poller.rb
CHANGED
@@ -12,7 +12,7 @@ module Vmail
|
|
12
12
|
log "Using notify tool: #{n}"
|
13
13
|
@notifier = case n
|
14
14
|
when /notify-send/
|
15
|
-
Proc.new {|t, m| `#{n} '#{t}' '#{m}'` }
|
15
|
+
Proc.new {|t, m| `#{n} -t 6000000 '#{t}' '#{m}'` }
|
16
16
|
when /growlnotify/
|
17
17
|
Proc.new {|t, m| `#{n} -t '#{t}' -m '#{m}'` }
|
18
18
|
end
|
@@ -37,8 +37,9 @@ module Vmail
|
|
37
37
|
new_ids = check_for_new_messages
|
38
38
|
if !new_ids.empty?
|
39
39
|
@ids = @ids + new_ids
|
40
|
-
|
41
|
-
|
40
|
+
# remove '<>' from email. libnotify can't print '<'
|
41
|
+
res = uncached_headers(new_ids).map {|m| m[:sender] }.join(", ").tr('<>','')
|
42
|
+
@notifier.call "Vmail: new email", "from " + res
|
42
43
|
end
|
43
44
|
rescue
|
44
45
|
log "VMAIL_ERROR: #{[$!.message, $!.backtrace].join("\n")}"
|
data/lib/vmail/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vmail
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.8.
|
4
|
+
version: 2.8.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: 2013-
|
12
|
+
date: 2013-03-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: mail
|