444 |
|
|
445 |
|
void Poller::submit(const string& type, const string& text) |
446 |
|
{ |
447 |
< |
// |
447 |
> |
ostringstream message; |
448 |
> |
|
449 |
> |
message << "From: \"Windows XP FAQ | Poll\" <" << account.getEmail() |
450 |
> |
<< ">\n" |
451 |
> |
<< "To: \"" << account.getName() << "\" <" << account.getEmail() |
452 |
> |
<< ">\n" |
453 |
> |
<< "Subject: Windows XP FAQ | Poll Submit\n" |
454 |
> |
<< "Content-Type: text/plain charset=\"us-ascii\"\n" |
455 |
> |
<< "Content-Transfer-Encoding: 7bit\n" |
456 |
> |
<< "X-Mailer: WinXPFAQPoll 1.0\n" |
457 |
> |
<< "X-WinXPFAQPoll-Submit-Type: " << type << "\n" |
458 |
> |
<< "X-WinXPFAQPoll-Submit-Text: " << text << "\n\n"; |
459 |
> |
|
460 |
> |
if (type == "find") |
461 |
> |
{ |
462 |
> |
message << "How did you find this page?\n" |
463 |
> |
<< " I arrived here by entirely different means:\n"; |
464 |
> |
} |
465 |
> |
else if (type == "improve") |
466 |
> |
{ |
467 |
> |
message << "How could I improve this site?\n" |
468 |
> |
<< " I have my own completely insane suggestion:\n"; |
469 |
> |
} |
470 |
> |
|
471 |
> |
message << " " << text << "\n\n" |
472 |
> |
<< "Flag this message to approve the voter\'s possibly objectionable\n" |
473 |
> |
<< "input or delete it to disapprove.\n\n" |
474 |
> |
<< "This message will be marked deleted when it is processed.\n"; |
475 |
> |
|
476 |
> |
ostringstream length; |
477 |
> |
length << (message.str().length() + 16); |
478 |
> |
|
479 |
> |
session->append('\"' + account.getMailbox() + "\" {" + length.str() + '}', |
480 |
> |
message.str()); |
481 |
> |
|
482 |
> |
session->noop(); |
483 |
|
} |
484 |
|
|
485 |
|
void Poller::approvals() |
486 |
|
{ |
487 |
|
// |
488 |
|
} |
489 |
+ |
|
490 |
+ |
void Poller::approval(unsigned message) |
491 |
+ |
{ |
492 |
+ |
// |
493 |
+ |
} |