22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
# File 'lib/gossip/cronies/smtp.rb', line 22
def add_configuration_choices(builder)
builder.add_choice(:mail_to,
:default => checked(:default_to),
:type => [:string]) { | command_line |
command_line.uses_option("--mail-to RECIPIENTS",
"Recipients of mail.",
"This can be a comma-separated list.",
df(:default_to)
)
}
builder.add_choice(:mail_from,
:default => checked(:default_from)) { | command_line |
command_line.uses_option("--mail-from SENDER",
"The sender of the mail (appears in From line).",
df(:default_from)
)
}
builder.add_choice(:mail_server,
:default => checked(:default_smtp_server)) { | command_line |
command_line.uses_option("--mail-server HOSTNAME",
"SMTP server. #{df(:default_smtp_server)}"
)
}
builder.add_choice(:mail_port,
:type => :integer,
:default => checked(:default_smtp_port)) { | command_line |
command_line.uses_option("--mail-port NUMBER",
"Mail port on that server.",
df(:default_smtp_port)
)
}
builder.add_choice(:mail_account,
:default => checked(:default_smtp_account)) { | command_line |
command_line.uses_option("--mail-account USERNAME",
"Your account name on the SMTP server.",
df(:default_smtp_account)
)
}
builder.add_choice(:mail_from_domain,
:default => checked(:default_from_domain)) { | command_line |
command_line.uses_option("--mail-from-domain HOSTNAME",
"The server the mail supposedly comes from.",
"(Not necessarily the SMTP server.)",
df(:default_from_domain)
)
}
builder.add_choice(:mail_password,
:default => checked(:default_smtp_password)) { | command_line |
command_line.uses_option("--mail-password HOSTNAME",
"Your password on the SMTP server.",
df(:default_smtp_password)
)
}
auth_types = ['plain', 'login', 'cram_md5']
builder.add_choice(:mail_authentication,
:type => auth_types,
:default => checked(:default_smtp_authentication)) { | command_line |
command_line.uses_option("--mail-authentication TYPE",
"The kind of authentication your SMTP server uses.",
"One of #{friendly_list('or', auth_types)}.",
df(:default_smtp_authentication)
)
}
end
|