diff options
author | Zdenek Prikryl <zdeny@dhcp-lab-218.englab.brq.redhat.com> | 2009-04-08 15:26:05 +0200 |
---|---|---|
committer | Zdenek Prikryl <zdeny@dhcp-lab-218.englab.brq.redhat.com> | 2009-04-08 15:26:05 +0200 |
commit | 70ccc1877c0d729b8c4aff450f6c4a3209e57c9b (patch) | |
tree | 091757654735c31f3784f7c4840a105bcea14b96 /lib/Plugins/Mailx.cpp | |
parent | 477fa5323fad21b978cf8025a80041f979b2c27b (diff) | |
download | abrt-70ccc1877c0d729b8c4aff450f6c4a3209e57c9b.tar.gz abrt-70ccc1877c0d729b8c4aff450f6c4a3209e57c9b.tar.xz abrt-70ccc1877c0d729b8c4aff450f6c4a3209e57c9b.zip |
added new CD_ATT type
Diffstat (limited to 'lib/Plugins/Mailx.cpp')
-rw-r--r-- | lib/Plugins/Mailx.cpp | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/lib/Plugins/Mailx.cpp b/lib/Plugins/Mailx.cpp index dbadb1e6..72d5cb7a 100644 --- a/lib/Plugins/Mailx.cpp +++ b/lib/Plugins/Mailx.cpp @@ -61,7 +61,7 @@ void CMailx::SendEmail(const std::string& pText) void CMailx::Report(const map_crash_report_t& pCrashReport) { std::stringstream emailBody; - std::stringstream binaryFiles, commonFiles, additionalFiles, UUIDFile; + std::stringstream binaryFiles, commonFiles, bigTextFiles, additionalFiles, UUIDFile; map_crash_report_t::const_iterator it; for (it = pCrashReport.begin(); it != pCrashReport.end(); it++) @@ -75,21 +75,25 @@ void CMailx::Report(const map_crash_report_t& pCrashReport) { additionalFiles << it->first << std::endl; additionalFiles << "-----" << std::endl; - additionalFiles << it->second[CD_CONTENT] << std::endl; + additionalFiles << it->second[CD_CONTENT] << std::endl << std::endl; } else if (it->first == FILENAME_UUID) { UUIDFile << it->first << std::endl; UUIDFile << "-----" << std::endl; - UUIDFile << it->second[CD_CONTENT] << std::endl; + UUIDFile << it->second[CD_CONTENT] << std::endl << std::endl; } else { commonFiles << it->first << std::endl; commonFiles << "-----" << std::endl; - commonFiles << it->second[CD_CONTENT] << std::endl; + commonFiles << it->second[CD_CONTENT] << std::endl << std::endl; } } + if (it->second[CD_TYPE] == CD_ATT) + { + bigTextFiles << " -a " << it->second[CD_CONTENT]; + } if (it->second[CD_TYPE] == CD_BIN) { binaryFiles << " -a " << it->second[CD_CONTENT]; @@ -107,17 +111,11 @@ void CMailx::Report(const map_crash_report_t& pCrashReport) emailBody << "Additional information" << std::endl; emailBody << "=====" << std::endl << std::endl; emailBody << additionalFiles.str() << std::endl; - emailBody << "Binary file[s]" << std::endl; - emailBody << "=====" << std::endl; + m_sAttachments = bigTextFiles.str(); if (m_bSendBinaryData) { - emailBody << "See the attachment[s]" << std::endl; - m_sAttachments = binaryFiles.str(); - } - else - { - emailBody << "Do not send them." << std::endl; + m_sAttachments += binaryFiles.str(); } SendEmail(emailBody.str()); |