SendEmailAttachData.xml 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
  4. <sect1 id="SendEmailAttachData">
  5. <title>SendEmailAttachData</title>
  6. <para><emphasis role="bold">STD.System.Email.SendEmailAttachData<indexterm>
  7. <primary>STD.System.Email.SendEmailAttachData</primary>
  8. </indexterm> <indexterm>
  9. <primary>System.Email.SendEmailAttachData</primary>
  10. </indexterm> <indexterm>
  11. <primary>Email.SendEmailAttachData</primary>
  12. </indexterm> <indexterm>
  13. <primary>SendEmailAttachData</primary>
  14. </indexterm>( </emphasis> <emphasis>sendto, subject, body, attachment,
  15. mimietype, filename, server, port, sender</emphasis> <emphasis role="bold">
  16. )</emphasis></para>
  17. <informaltable colsep="0" frame="none" rowsep="0">
  18. <tgroup cols="2">
  19. <colspec colwidth="80.50pt" />
  20. <colspec />
  21. <tbody>
  22. <row>
  23. <entry><emphasis>sendto</emphasis></entry>
  24. <entry>A null-terminated string containing a comma-delimited list of
  25. the addresses of the intended recipients. The validity of the
  26. addresses is not checked, so it is the programmer's responsibility
  27. to ensure they are all valid.</entry>
  28. </row>
  29. <row>
  30. <entry><emphasis>subject</emphasis></entry>
  31. <entry>A null-terminated string containing the subject line.</entry>
  32. </row>
  33. <row>
  34. <entry><emphasis>body</emphasis></entry>
  35. <entry>A null-terminated string containing the text of the email to
  36. send. This must be character encoding “ISO-8859-1 (latin1)” (the ECL
  37. default character set). Text in any other character set must be sent
  38. as an <emphasis>attachment</emphasis>.</entry>
  39. </row>
  40. <row>
  41. <entry><emphasis>attachment</emphasis></entry>
  42. <entry>A DATA value containing the binary data to attach.</entry>
  43. </row>
  44. <row>
  45. <entry><emphasis>mimetype</emphasis></entry>
  46. <entry>A null-terminated string containing the MIME-type of the
  47. <emphasis>attachment</emphasis>, which may include entrymeters (such
  48. as ‘text/plain; charset=ISO-8859-3’). When attaching general binary
  49. data for which no specific MIME type exists, use
  50. ‘application/octet-stream’.</entry>
  51. </row>
  52. <row>
  53. <entry><emphasis>filename</emphasis></entry>
  54. <entry>A null-terminated string containing the name of the
  55. <emphasis>attachment</emphasis> for the mail reader to
  56. display.</entry>
  57. </row>
  58. <row>
  59. <entry><emphasis>server</emphasis></entry>
  60. <entry>Optional. A null-terminated string containing the name of the
  61. mail server. If omitted, defaults to the value in the SMTPserver
  62. environment variable.</entry>
  63. </row>
  64. <row>
  65. <entry><emphasis>port</emphasis></entry>
  66. <entry>Optional. An UNSIGNED4 integer value containing the port
  67. number. If omitted, defaults to the value in the SMTPport
  68. environment variable.</entry>
  69. </row>
  70. <row>
  71. <entry><emphasis>sender</emphasis></entry>
  72. <entry>Optional. A null-terminated string containing the address of
  73. the sender. If omitted, defaults to the value in the
  74. emailSenderAddress environment variable.</entry>
  75. </row>
  76. </tbody>
  77. </tgroup>
  78. </informaltable>
  79. <para>The <emphasis role="bold">SendEmailAttachData </emphasis>function
  80. sends an email message with a binary <emphasis>attachment</emphasis>.</para>
  81. <para>Example:</para>
  82. <programlisting format="linespecific">DATA15 attachment := D'test attachment';
  83. STD.System.Email.SendEmailAttachData( 'me@mydomain.com',
  84. 'testing 1,2,3',
  85. 'this is a test message',
  86. attachment,
  87. 'application/octet-stream',
  88. 'attachment.txt');</programlisting>
  89. </sect1>