diff options
author | Thorbjørn Lindeijer <bjorn@lindeijer.nl> | 2009-10-20 23:23:15 +0200 |
---|---|---|
committer | Thorbjørn Lindeijer <bjorn@lindeijer.nl> | 2009-10-20 23:23:15 +0200 |
commit | 1dcc9d8d2809563142fbe091afce2b2d3fac3c65 (patch) | |
tree | a2de06ba2c91df2060237b6791ac0a15ca76d27a /bin | |
parent | 80c7437abbb3acde3d7f9fffb0840dc7776246ab (diff) | |
download | website-1dcc9d8d2809563142fbe091afce2b2d3fac3c65.tar.gz website-1dcc9d8d2809563142fbe091afce2b2d3fac3c65.tar.bz2 website-1dcc9d8d2809563142fbe091afce2b2d3fac3c65.tar.xz website-1dcc9d8d2809563142fbe091afce2b2d3fac3c65.zip |
Some textual improvements and fixes
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/createaccount.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/bin/createaccount.rb b/bin/createaccount.rb index 7ed1b33..0f9228e 100755 --- a/bin/createaccount.rb +++ b/bin/createaccount.rb @@ -4,10 +4,10 @@ require 'mysql' require 'net/smtp' $smtp_server = 'localhost' -$mail_from = 'registration@themanaworld.org' -$mail_from_name = 'The ManaWorld team' +$mail_from = 'noreply@themanaworld.org' +$mail_from_name = 'The Mana World server' $mail_subject = 'The Mana World Account registration' -$mail_body_success = "Your account was created successfully. Have fun playing themanaworld.\n" +$mail_body_success = "Your account was created successfully. Have fun playing The Mana World!\n" $mail_body_error = "The was something wrong with the creation of your account.\n" + "Error message: " $mysql_hostname = "localhost" @@ -36,6 +36,7 @@ def send_mail(email, username, status, errm) message = "From: #{$mail_from_name} <#{$mail_from}>\n" + "To: #{username} <#{email}>\n" + "Subject: #{$mail_subject}\n\n" + message << "Hello #{username},\n\n" if status == :SUCCESS then message << $mail_body_success @@ -67,7 +68,7 @@ db.query("SELECT id, username, password, email, gender if retval.include? retcode['message'] then send_mail( email, username, retcode['status'], retcode['message'] ) db.query("UPDATE tmw_accounts SET STATE = #{retcode['final_state']} WHERE id = #{id}") - end + end end rescue puts "ERROR occured" |