Re: AutoNotification Problems

From: Ron Hensley (
Date: 03/26/99

          Here you store the body of the message in buf
>       sprintf(buf, "%s", system_body);
>       sprintf(filename, "system_info");
          Here you overwrite the contents of buf, and erase system_body
          Also you are trying to mail the contents of a file called
            system_info which I don't see this code opening, writing to,
            or closing.
>       sprintf(buf, "elm -s %s %s < %s", system_subject, email1, filename);
>       system(buf);
>       sprintf(buf, "rm %s", filename);

Test your elm statement from the unix command prompt
create the system_info file
  # echo "This is a test body" > system_info
  # elm -s "My Subject" < system_info

See what happens. You may find you get an elm not found error and thus
need to use the full path to elm, or a permission denied error if your
muds account cant run elm. Anyway you may see what problem the mud is
having when trying to run the email command.

I use /usr/bin/mail to do something somewhat similar

      if ((in = fopen("system_info", "w")) != NULL) {
        printf("Test system message, blah blah.....\n");
          "/usr/bin/mail -s %s %s < %s",
          email_subject, email_address, "system_info");
      } else
        log("Error creating system_info by mailer");

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  |

This archive was generated by hypermail 2b30 : 12/15/00 PST