Sophie

Sophie

distrib > Fedora > 13 > i386 > media > updates-src > by-pkgid > e548512dcc847653815f1b7adc710b15 > files > 4

libvmime07-0.7.1-4.fc13.src.rpm

Patch by Zarafa <http://www.zarafa.com/> - makes the messageBuilder helper generate an mail without To or
Cc headers. This way, an email with only Bcc entries will still be sent. This feature is mostly used by
people to mask a mailing list or invitation that should be send to alot of people.

--- libvmime-0.7.1/src/messageBuilder.cpp				2005-03-18 22:26:47.000000000 +0100
+++ libvmime-0.7.1/src/messageBuilder.cpp.allow-no-recips-and-senders	2006-01-13 09:49:51.000000000 +0100
@@ -50,14 +50,11 @@
 	// Generate the header fields
 	msg->getHeader()->Subject().setValue(m_subject);
 
-	if (m_from.isEmpty())
-		throw exceptions::no_expeditor();
-
-	if (m_to.isEmpty() || m_to.getAddressAt(0)->isEmpty())
-		throw exceptions::no_recipient();
-
-	msg->getHeader()->From().setValue(m_from);
-	msg->getHeader()->To().setValue(m_to);
+	if (!m_from.isEmpty())
+		msg->getHeader()->From().setValue(m_from);
+		
+	if (!m_to.isEmpty())
+		msg->getHeader()->To().setValue(m_to);
 
 	if (!m_cc.isEmpty())
 		msg->getHeader()->Cc().setValue(m_cc);