trouble with a verb to email players

0 views
Skip to first unread message

Burnettiii

unread,
Apr 9, 2014, 12:30:49 AM4/9/14
to MOO-...@googlegroups.com
I am having trouble with the verb bellow. it emails the player. it also includes the subject in the email. the problem is that is doesn't include the message. i can change the line rc = $network:sendmail(pl.email_address, subject, msg); to be like rc = $network:sendmail(pl.email_address, subject, "test"); and it will email the player, subject and test as the email body. so i am not really sure what is going on. any help would be appreciated.

Kenny

pl = $string_utils:match_player(dobjstr);
if (!valid(pl))
  player:tell("I don't understand. Try: @email <player name>.");
  return;
endif
player:tell("Type in a subject.");
subject = read();
player:tell("Type in the message");
msg = $command_utils:read_lines();
player:tell("Subject: ", subject);
player:tell();
player:tell_lines(msg);
if (!$command_utils:yes_or_no("Send above message?"))
  return player:tell("Nothing sent.");
endif
success = 0;
failed = {};
player:tell("Stand by sending Email.");
rc = $network:sendmail(pl.email_address, subject, msg);
if (!rc)
  player:tell("Message to ", pl:title(), " was sent successfully.");
  "If it returns something other than 0 (an empty string, empty list, or the number 0 are all false), the rest of this will run.";
else
  player:tell(((("There was an error sending your message to " + pl:title()) + ". $network:sendmail returned") + rc) + ".");
endif

Littlefield, Tyler

unread,
Apr 9, 2014, 12:34:39 AM4/9/14
to Burnettiii, MOO-...@googlegroups.com
I believe that verb wants a string, not a list of strings. so just flatten that list and you should be set.
--
You received this message because you are subscribed to the Google Groups "MOO Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to MOO-talk+u...@googlegroups.com.
To post to this group, send email to MOO-...@googlegroups.com.
Visit this group at http://groups.google.com/group/MOO-talk.
For more options, visit https://groups.google.com/d/optout.


-- 
Take care,
Ty
http://tds-solutions.net
He that will not reason is a bigot; he that cannot reason is a fool; he that dares not reason is a slave.

Chris

unread,
Apr 9, 2014, 3:59:19 AM4/9/14
to Burnettiii, MOO-...@googlegroups.com
Try using @msg in your sendmail bit. 

Hth,

Sent from my iPad
--
Reply all
Reply to author
Forward
0 new messages