Sha256: e9dacccbf5b2269cf4f13584db969c04f114619feba16d61e97a4d2dea3f3884

Contents?: true

Size: 423 Bytes

Versions: 5

Compression:

Stored size: 423 Bytes

Contents

#!/usr/bin/env ruby
#
# Sample script for sending e-mail to a registered user
#
require './lib/media_wiki'

config = MediaWiki::Config.new ARGV
user, subject = ARGV
config.abort("Syntax: email_user.rb [username] [subject] <content") unless user and subject

mw = MediaWiki::Gateway.new(config.url, { :loglevel => Logger::DEBUG } )
mw.login(config.user, config.pw)
content = STDIN.read
mw.email_user(user, subject, content)

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
mediawiki-gateway-0.6.2 samples/email_user.rb
mediawiki-gateway-0.6.1 samples/email_user.rb
mediawiki-gateway-0.6.0 samples/email_user.rb
mediawiki-gateway-0.5.2 samples/email_user.rb
mediawiki-gateway-0.5.1 script/email_user.rb