Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
themeConfluence
languagexml
<?xml version="1.0" encoding="UTF-8"?> <ns1:Email xmlns> <ns1:Email xmlns:ns1="http://www.fiorano.com/fesb/activity/SMTP1/smtp/in"> <To>To</To> <From>From</From> <CC>CC</CC> <BCC>BCC</BCC> <ReplyTo>ReplyTo</ReplyTo> <ReturnReceipt>false</ReturnReceipt> <Subject charset> <To>To</To> <From>From</From> <CC>CC</CC> <BCC>BCC</BCC> <ReplyTo>ReplyTo</ReplyTo> <ReturnReceipt>false</ReturnReceipt> <Subject charset="UTF-8">string</Subject> <Headers> <Header nameSubject> <Headers> <Header name="name" value value="value" charset charset="UTF-8"  /> </Headers> <Attachments> <Attachment name> </Headers> <Attachments> <Attachment name="name" readFromFile contentId="&lt;contentId&gt;" readFromFile="no" base64Encoded base64Encoded="no">string</Attachment> </Attachments> <Body charsetAttachment> </Attachments> <Body charset="UTF-8"> <TextBody>TextBody</TextBody> <HtmlBody>HtmlBody</HtmlBody> </Body> <> <TextBody>TextBody</TextBody> <HtmlBody>HtmlBody</HtmlBody> </Body> </ns1:Email> 

Figure 11: Input in XML format when SMTP protocol is selected

...

Code Block
<?xml version="1.0" encoding="UTF-8"?> <ns1:Email xmlns> <ns1:Email xmlns:ns1="http://www.fiorano.com/fesb/activity/SMTP1/smtp/in"> <Newsgroup>Newsgroup</Newsgroup> <From>From</From> <Subject charset> <Newsgroup>Newsgroup</Newsgroup> <From>From</From> <Subject charset="UTF-8">string</Subject> <Headers> <Header nameSubject> <Headers> <Header name="name" value value="value" charset charset="UTF-8"  /> </Headers> <Attachments> <Attachment name> </Headers> <Attachments> <Attachment name="name" readFromFile contentId="&lt;contentId&gt;" readFromFile="no" base64Encoded base64Encoded="no">string</Attachment> </Attachments> <Body charsetAttachment> </Attachments> <Body charset="UTF-8"> <TextBody>TextBody</TextBody> <HtmlBody>HtmlBody</HtmlBody> </Body> <> <TextBody>TextBody</TextBody> <HtmlBody>HtmlBody</HtmlBody> </Body> </ns1:Email>

Figure 12: Input in XML formatwhen NNTP protocol is selected

...

  • To: Applicable only for SMTP protocol, E-mail ID of the primary recipient(s). For multiple recipients, the e-mail IDs should be separated by comma.
  • Newsgroup: Applicable only for NNTP protocol Newsgroup ID/Name of the primary recipient(s). For multiple recipients, the Newsgroup IDs should be separated by comma.
  • From: E-mail ID of the sender. The E-mail ID provided here will override the value provided for property Email ID of the Sender in the CPS. This element is optional.
  • CC: Applicable only for SMTP protocol, E-mail ID of the CC (carbon copy) recipient(s) to be copied in the e-mail. For multiple recipients, the e-mail IDs should be separated by comma. This element is optional.
  • BCC: Applicable only for SMTP protocol, E-mail ID of the BCC (blind carbon copy) recipient(s) to be copied in the mail. For multiple recipients, the e-mail IDs should be separated by comma. This element is optional.
  • ReplyTo: Applicable only for SMTP protocol, ReplyTo header field. Comma separated e-mail IDs can be used here.
    The ReplyTo field is used by some e-mail programs when the Reply address is different than the From address.
    While replying to an e-mail using Reply function, if ReplyTo header was set on the message, then the e-mail client shows the Reply-To field instead of the From field in the To address. This element is optional.
  • DispositionNotificationTo: E-mail ID to which a receipt/acknowledgement mail is to be sent back to (from recipients of this mail).
  • ReturnReceipt: Boolean indicating whether the mail is a normal one or a receipt/acknowledgement mail. If set to 'true', a multi-part report will be generated and sent as acknowledgement mail. 

    Note

    DispositionNotificationTo and ReturnReceipt are mutually exclusive elements. If it is an acknowledgement mail, DispositionNotificationTo should not be present.

  • Subject: Subject of the e-mail. This element is optional.
  • Headers: The headers provided (name value pairs) are added as Headers in the message. This element is optional.

    Note

    This cannot be used to replace the default e-mail headers.

  • Attachments: This option is used to send attachments in the e-mail. This element is optional.
    The attachment name is the value of the name attribute in the Attachment element.

    Note
    • The value of ContentId given to a particular attachment can be used to refer the attachment in 'HtmlBody' tag under 'Body' tag. "&lt;" and "&gt;" are used to represent special characters '<' and '>' respectively.
    • If the value of readFromFile attribute is set to No, then a new attachment file is created with the data provided against this tag as the file contents, and added as an attachment to the email.
      Example: <Attachment name="attachment" readFromFile="no" base64Encoded="no">attachment content</Attachment>
    • If the value of readFromFile attribute is set to Yes, then the path of the file which has to be added as an attachment should be provided with this tag.
      Example: <Attachment name="attachment" readFromFile="yes" base64Encoded="no">/path/of/attachment</Attachment>
    • The attribute base64encoded attribute specifies whether the attachment is base64 encoded. This property is used only when readFromFile attribute is set to No.
    • If base64encoded value is set to Yes, then the value is base64 decoded before sending as an attachment.
  • Body: Used to specify the e-mail message body. This element is optional.
    • TextBody: Sets the given string as the body content with a MIME type of text/plain.
    • HTMLBody: Sets the given value as the body content with MIME type text/html.

...

Anchor
_Toc336443133
_Toc336443133
Scenario 1

Sending HTML mails emails with attachment.

Tip

Choose scenario(s) that can be superset in terms of number of features it can demonstrate.

Configure the SMTP Bridge as described in Configuration and Testing section and use Feeder and Display component to send sample input and check the response respectively.

Image RemovedImage Added
Figure 7: Demonstrating Scenario 1 with sample input and outputImage Removed
Sample flow for Scenario 1

 

Code Block
titleSample Input
languagexml
collapsetrue
<ns1:Email xmlns:ns1="http://www.fiorano.com/fesb/activity/SMTP1/smtp/in">
   <To>ayrton@fiorano.com</To>
   <Subject charset="UTF-8">SAMPLE</Subject>
   <Headers>
      <Header name="name" value="value" charset="UTF-8"/>
   </Headers>
   <Attachments>
      <Attachment name="boat.png" contentId="&lt;myimagecid&gt;" readFromFile="yes" base64Encoded="no">/home/ayrton/Pictures/boat.png</Attachment>
   </Attachments>
   <Body charset="UTF-8">
      <HtmlBody>
         <![CDATA[ 
            <html>
               <head>
                  <meta http-equiv="content-type" content="text/html; charset=utf-8">
               </head>
               <body>
                  <p>         Hi Ayrton,
This is a sample message.</p>
                  <img alt="" src="cid:myimagecid" height="512" width="512">
               </body>
            </html>
         ]]>
      </HtmlBody>
   </Body>
</ns1:Email>
Code Block
titleSample Output
languagexml
collapsetrue
<?xml version="1.0" encoding="UTF-8"?>
<ns1:SMTP xmlns:ns1="http://www.fiorano.com/fesb/activity/SMTP1/smtp/out">
   <ns1:Result>Email sent successfully </ns1:Result>
</ns1:SMTP>

Image Added
Figure 8: Mail sent by SMTP Bridge in the Inbox

...

In an order entry scenario e-mails can be sent to the concerned party when a PO is accepted or rejected.

...

Adaptavist ThemeBuilder EngineAtlassian Confluence