5 * \defgroup SMTPqueue Display the outbound SMTP queue
6 * \ingroup CitadelConfig
12 * \brief display one message in the queue
14 void display_queue_msg(long msgnum)
18 serv_printf("MSG2 %ld", msgnum);
19 serv_getln(buf, sizeof buf);
20 if (buf[0] != '1') return;
22 while (serv_getln(buf, sizeof buf), strcmp(buf, "000")) {
25 wprintf(_("Message ID"));
27 wprintf(_("Date/time submitted"));
29 wprintf(_("Last attempt"));
33 wprintf(_("Recipients"));
34 wprintf("</td></tr>\n");
42 * \brief display the outbound SMTP queue
44 void display_smtpqueue(void)
49 output_headers(1, 1, 2, 0, 0, 0);
50 wprintf("<div id=\"banner\">\n");
51 wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#444455\"><TR><TD>");
52 wprintf("<SPAN CLASS=\"titlebar\">");
53 wprintf(_("View the outbound SMTP queue"));
55 wprintf("</TD></TR></TABLE>\n");
56 wprintf("</div>\n<div id=\"content\">\n");
58 wprintf("<div class=\"fix_scrollbar_bug\">"
59 "<table border=0 width=100%% bgcolor=\"#FFFFFF\">"
60 "<tr><td valign=top>\n");
63 /* Check to see if we can go to the __CitadelSMTPspoolout__ room.
64 * If not, we don't have access to the queue.
66 gotoroom("__CitadelSMTPspoolout__");
67 if (!strcasecmp(WC->wc_roomname, "__CitadelSMTPspoolout__")) {
69 num_msgs = load_msg_ptrs("MSGS ALL", 0);
72 wprintf("<table border=1 width=100%%>\n");
74 wprintf(_("Message ID"));
76 wprintf(_("Date/time submitted"));
78 wprintf(_("Last attempt"));
82 wprintf(_("Recipients"));
83 wprintf("</td></tr>\n");
85 for (i=0; i<num_msgs; ++i) {
86 display_queue_msg(WC->msgarr[i]);
93 wprintf("<br /><br /><div align=\"center\">");
94 wprintf(_("The queue is empty."));
95 wprintf("</div><br /><br />");
99 wprintf("<br /><br /><div align=\"center\">");
100 wprintf(_("You do not have permission to view this resource."));
101 wprintf("</div><br /><br />");
104 wprintf("</td></tr></table></div>\n");