test648 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <testcase>
  2. <info>
  3. <keywords>
  4. SMTP
  5. MULTIPART
  6. </keywords>
  7. </info>
  8. #
  9. # Server-side
  10. <reply>
  11. </reply>
  12. #
  13. # Client-side
  14. <client>
  15. <server>
  16. smtp
  17. </server>
  18. <name>
  19. SMTP multipart with transfer content encoders
  20. </name>
  21. <stdin>
  22. From: different
  23. To: another
  24. body
  25. </stdin>
  26. <command>
  27. smtp://%HOSTIP:%SMTPPORT/648 --mail-rcpt recipient@example.com --mail-from sender@example.com -F '=This is the e-mail inline text with a very long line containing the special character = and that should be split by encoder.;headers=Content-disposition: "inline";encoder=quoted-printable' -F "=@log/test648.txt;encoder=base64" -H "From: different" -H "To: another"
  28. </command>
  29. <file name="log/test648.txt">
  30. This is an attached file.
  31. It may contain any type of data and will be encoded in base64 for transfer.
  32. </file>
  33. </client>
  34. #
  35. # Verify data after the test has been "shot"
  36. <verify>
  37. <strippart>
  38. s/^--------------------------[a-z0-9]*/------------------------------/
  39. s/boundary=------------------------[a-z0-9]*/boundary=----------------------------/
  40. </strippart>
  41. <protocol>
  42. EHLO 648
  43. MAIL FROM:<sender@example.com>
  44. RCPT TO:<recipient@example.com>
  45. DATA
  46. QUIT
  47. </protocol>
  48. <upload>
  49. Content-Type: multipart/mixed; boundary=----------------------------
  50. Mime-Version: 1.0
  51. From: different
  52. To: another
  53. ------------------------------
  54. Content-Transfer-Encoding: quoted-printable
  55. Content-disposition: "inline"
  56. This is the e-mail inline text with a very long line containing the special=
  57. character =3D and that should be split by encoder.
  58. ------------------------------
  59. Content-Disposition: attachment; filename="test648.txt"
  60. Content-Transfer-Encoding: base64
  61. VGhpcyBpcyBhbiBhdHRhY2hlZCBmaWxlLgoKSXQgbWF5IGNvbnRhaW4gYW55IHR5cGUgb2YgZGF0
  62. YSBhbmQgd2lsbCBiZSBlbmNvZGVkIGluIGJhc2U2NCBmb3IgdHJhbnNmZXIuCg==
  63. --------------------------------
  64. .
  65. </upload>
  66. </verify>
  67. </testcase>