Tuesday, January 26, 2016

How to configure mail in StreamServer project(5.x)

one of my customer wants to the deliver his purchase order as email .These email address are defined in the stream file header. These entries are based on the CRS945 and MNS205.
image_thumb9_thumb[1]
According to the above example Mail should goes to the fromMailAddres@test.lk and from address should be tomail@test.lk.
As first step Mail server settings should be defined in the relevant Platform settings in the design center.
Go to the relevant platform .
image_thumb11_thumb[2]
Then right click on the mail settings and go to the settings tab and click the connector .
image_thumb13_thumb[1]
Then need to select the Connector type .There are several inbuilt connects types available with streamserver . For this case I'm use the STMP(MIME)(Legacy) connector .
Please note that by default this connector use the 25 as the mail port for sending emails and if your client use separate port then you have to you another connector . Ideally STMP MIME connector.
then provide relevant mail server address and UN and PW based on the customer site mail configuration .You can ask these information for IT administrator of the customer site.
After configuring the platform we need to configure the Runtime settings .
Below is the runtime settings for my PO.In run time we need to set from email /to email /subject and other required settings for the email.
When stream serve begin the execution, stream server agent create some set of initial variables for all the entries which stated with * sign in the streamfile and assign values .
image_thumb15_thumb[1]
For my case below are the variables generated by the agent.Please refer the below url for all agent generated values .(http://streamshare.streamserve.com/Forum/Topic/?topicID=990).
Stream File Name
Agent Generated Name
Value
*TOMAIL1
$mvx_tomail
fromMailAddres@test.lk
*FRMAIL1
$mvx_frmail
tomail@test.lk
*SUBJECT1
$mvx_subject
M3 output
image_thumb28_thumb[1]
right click on mail settings and go the settings and select respective platform .
image_thumb30_thumb[1]
And then go the Edit mail.
image_thumb32_thumb[1]
And fill the From/to/subject etc based on the agent generated variable  and click ok .
Then you are good to go. Save export and deploy the project.