From 02ed4a60f394f53de32b10459c959ad6a1f7b887 Mon Sep 17 00:00:00 2001 From: NotZed Date: Fri, 28 Apr 2000 03:07:30 +0000 Subject: Fix for removal of camelmimebodypart, and changes to recipient stuff. 2000-04-27 NotZed * tests/test10.c: Fix for removal of camelmimebodypart, and changes to recipient stuff. * tests/test1.c: Fix for removal of camelmimebodypart, and changes to recipient stuff. svn path=/trunk/; revision=2672 --- tests/test10.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'tests/test10.c') diff --git a/tests/test10.c b/tests/test10.c index 0beecb598e..5e20d2f6db 100644 --- a/tests/test10.c +++ b/tests/test10.c @@ -18,7 +18,7 @@ static CamelMimeMessage * create_sample_mime_message () { CamelMimeMessage *message; - CamelMimeBodyPart *body_part; + CamelMimePart *body_part; CamelMultipart *multipart; @@ -30,26 +30,27 @@ create_sample_mime_message () camel_medium_add_header (CAMEL_MEDIUM (message), "X-test2", "the value of another test"); camel_mime_message_set_date (message, time(0), 200); - camel_mime_message_set_subject (message, g_strdup ("A test message")); - camel_mime_message_set_reply_to (message, g_strdup ("toto@toto.com")); - camel_mime_message_set_from (message, g_strdup ("Bertrand.Guiheneuf@aful.org")); + camel_mime_message_set_subject (message, "A test message"); + camel_mime_message_set_reply_to (message, "toto@toto.com"); + camel_mime_message_set_from (message, "Bertrand.Guiheneuf@aful.org"); camel_mime_message_add_recipient (message, CAMEL_RECIPIENT_TYPE_TO, - g_strdup ("franck.dechamps@alseve.fr")); + "Franck DeChamps", "franck.dechamps@alseve.fr"); camel_mime_message_add_recipient (message, CAMEL_RECIPIENT_TYPE_TO, - g_strdup ("mc@alseve.fr")); + NULL, "mc@alseve.fr"); camel_mime_message_add_recipient (message, CAMEL_RECIPIENT_TYPE_TO, - g_strdup ("richard.lengagne@inria.fr")); + "Richo", "richard.lengagne@inria.fr"); camel_mime_message_add_recipient (message, CAMEL_RECIPIENT_TYPE_CC, - g_strdup ("Francois.fleuret@inria.fr")); + "Frank", "Francois.fleuret@inria.fr"); camel_mime_message_add_recipient (message, CAMEL_RECIPIENT_TYPE_CC, - g_strdup ("maury@justmagic.com")); + NULL, "maury@justmagic.com"); camel_mime_message_add_recipient (message, CAMEL_RECIPIENT_TYPE_BCC, - g_strdup ("Bertrand.Guiheneuf@aful.org")); + "Bertie", "Bertrand.Guiheneuf@aful.org"); multipart = camel_multipart_new (); - body_part = camel_mime_body_part_new (); - camel_mime_part_set_text (CAMEL_MIME_PART (body_part), "This is a test.\nThis is only a test.\n"); + body_part = camel_mime_part_new (); + camel_mime_part_set_content (CAMEL_MIME_PART (body_part), "This is a test.\nThis is only a test.\n", + strlen("This is a test.\nThis is only a test.\n"), "text/plain"); camel_multipart_add_part (multipart, body_part); camel_medium_set_content_object (CAMEL_MEDIUM (message), CAMEL_DATA_WRAPPER (multipart)); -- cgit v1.2.3