AddPart (Email subroutine): Difference between revisions
Jump to navigation
Jump to search
m (Created page with "This callable method allows you to add one or more attachments to the body of an SMTP message. ==AddPart syntax== <p class="pre"> %email:AddPart(content, [options]) </p> ===Syn...") |
m (Created page with "This callable method allows you to add one or more attachments to the body of an SMTP message. ==AddPart syntax== <p class="pre"> %email:AddPart(content, [options]) </p> ===Syn...") |
||
Line 1: | Line 1: | ||
{{Template:Email:AddPart subtitle}} | |||
This callable method allows you to add one or more attachments to the | This callable method allows you to add one or more attachments to the | ||
body of an SMTP message. | body of an SMTP message. | ||
== | ==Syntax== | ||
{{Template:Email:AddPart syntax}} | |||
===Syntax terms=== | ===Syntax terms=== | ||
<table class="syntaxTable"> | <table class="syntaxTable"> | ||
Line 33: | Line 33: | ||
AddPart performs no validity checking, but it does distinguish | AddPart performs no validity checking, but it does distinguish | ||
between text MIME types (“text” is the primary type) and non-text types. | between text MIME types (&ldquo;text&rdquo; is the primary type) and non-text types. | ||
If non-text, AddPart encodes the content in base64 format | If non-text, AddPart encodes the content in base64 format | ||
to ensure correct translation at SMTP gateways. | to ensure correct translation at SMTP gateways. | ||
Line 70: | Line 70: | ||
</td></tr></table> | </td></tr></table> | ||
==Usage | ==Usage notes== | ||
<ul> | <ul> | ||
<li>Subsequent invocations of the <var>AddPart</var> method add a separate attachment | <li>Subsequent invocations of the <var>AddPart</var> method add a separate attachment | ||
Line 77: | Line 77: | ||
see [[SMTP Helper#E-mail with attachment|"E-mail with attachment"]]. | see [[SMTP Helper#E-mail with attachment|"E-mail with attachment"]]. | ||
</ul> | </ul> | ||
==See also== | |||
{{Template:Email:AddPart footer}} |
Revision as of 21:41, 5 July 2011
Add one or more attachments (Email class)
This callable method allows you to add one or more attachments to the
body of an SMTP message.
Syntax
email:AddPart( content, [Type= string], [Name= string], [Encoding= string], - [Disposition= string], [Description= string])
Syntax terms
A previously declared Email object. | |
content | A Stringlist or longstring that contains the attachment or body part.
If a Stringlist is passed, each item in the Stringlist is delimited
with a carriage-return/line-feed (CR/LF) character pair.
To override this line-ending, you can specify a non-text content type
as the value of the If a longstring is passed, no delimiters are added to the content. |
options | Any comma-separated combination of the following options.
Each may be specified only once.
|
Usage notes
- Subsequent invocations of the AddPart method add a separate attachment to the existing content.
- For a code example that includes the addition of an attachment, see "E-mail with attachment".