4dc @verb #1492:"mailme" any any any rxd #60 @program #1492:"mailme" any any any "mailme note" if (caller_perms() != player && caller != player) return player:tell("Someone tried to mail you some text, but it didn't work.") endif if (!player.email_address) return player:tell("Sorry, you don't have a registered email address.") endif if (!argstr || (dobj == this && !prepstr)) where = this.stack[1] elseif (which = this:match_choice($code_utils:short_prep(prepstr) == "on" && iobj == this ? dobjstr | argstr)) where = $gopher:parse(this.value[which]) endif if (where) player:tell("Mailing ", this:location_string(where), " to ", player.email_address, ".") text = $gopher:_mail_text(where) player:tell("... ", length(text), " lines ...") text = {tostr("(Mail initiated by ", player.name, " (", player, ") connected from ", $string_utils:connection_hostname(connection_name(player)), " using ", this.name, ")"), @text} suspend(0) result = $network:sendmail(player.email_address, this:location_string(where), @text) if (result == 0) player:tell("Mail sent successfully.") else player:tell("Mail sending error: ", result, ".") endif else player:tell("Sorry, can't mail this.") endif . 0