test647 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <testcase>
  2. <info>
  3. <keywords>
  4. IMAP
  5. APPEND
  6. MULTIPART
  7. </keywords>
  8. </info>
  9. #
  10. # Server-side
  11. <reply>
  12. </reply>
  13. #
  14. # Client-side
  15. <client>
  16. <server>
  17. imap
  18. </server>
  19. <name>
  20. IMAP APPEND multipart using mime API
  21. </name>
  22. <command>
  23. imap://%HOSTIP:%IMAPPORT/647 -F "=(;type=multipart/alternative" -F "= <body>This is the html version</body>;type=text/html" -F "=This is the plain text version" -F "=)" -F "=@log/test647.txt" -H "Date: Mon, 7 Feb 1994 21:52:25 -0800 (PST)" -H "From: Fred Foobar <foobar@example.com>" -H "To: joe@example.com" -H "Message-Id: <B27397-0100000@example.com>" -H "Subject: afternoon meeting" -u user:secret
  24. </command>
  25. <file name="log/test647.txt">
  26. This is an attached file.
  27. It may contain any type of data.
  28. </file>
  29. </client>
  30. #
  31. # Verify data after the test has been "shot"
  32. <verify>
  33. <strippart>
  34. s/^--------------------------[a-z0-9]*/------------------------------/
  35. s/boundary=------------------------[a-z0-9]*/boundary=----------------------------/
  36. </strippart>
  37. <protocol>
  38. A001 CAPABILITY
  39. A002 LOGIN user secret
  40. A003 APPEND 647 (\Seen) {892}
  41. A004 LOGOUT
  42. </protocol>
  43. <upload>
  44. Content-Type: multipart/mixed; boundary=----------------------------
  45. Mime-Version: 1.0
  46. Date: Mon, 7 Feb 1994 21:52:25 -0800 (PST)
  47. From: Fred Foobar <foobar@example.com>
  48. To: joe@example.com
  49. Message-Id: <B27397-0100000@example.com>
  50. Subject: afternoon meeting
  51. ------------------------------
  52. Content-Type: multipart/alternative; boundary=----------------------------
  53. ------------------------------
  54. Content-Type: text/html
  55. Content-Transfer-Encoding: 8bit
  56. <body>This is the html version</body>
  57. ------------------------------
  58. This is the plain text version
  59. --------------------------------
  60. ------------------------------
  61. Content-Disposition: attachment; filename="test647.txt"
  62. This is an attached file.
  63. It may contain any type of data.
  64. --------------------------------
  65. </upload>
  66. </verify>
  67. </testcase>