View/Edit #12:send_self_netmail

Switch to edit mode.

Name(s): send_self_netmail
1:  ":send_self_netmail(msg [ ,from ])"
2:  "return 0 if successful, otherwise error."
3:  if (!$perm_utils:controls(caller_perms(), this))
4:    return E_PERM
5:  elseif (error = $network:invalid_email_address(this.email_address))
6:    return "Invalid email address: " + error
7:  else
8:    msg = args[1]
9:    if (length(args) > 1)
10:     from = args[2]
11:     this:notify(tostr("Receiving mail from ", from:title(), " (", from, ") and forwarding it to your .email_address."))
12:   endif
13:   oplayer = player
14:   player = this
15:   error = $network:sendmail(this.email_address, @msg)
16:   if (error && length(args) > 1)
17:     this:notify(tostr("Mail sending failed: ", error))
18:   endif
19:   player = oplayer
20:   return error
21: endif

Verb arguments: this none this
Verb perms: Readable eXecutable NOT-Debug
Verb owned by: Slacker (#55)

You are not logged in.

[home | help | who | search | setup | code]