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" email@address.com < 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"); fclose(in); sprintf(buf, "/usr/bin/mail -s %s %s < %s", email_subject, email_address, "system_info"); system(buf); } else log("Error creating system_info by mailer"); +------------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html | +------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/15/00 PST