Send mail
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > BizTalk Server > BizTalk Server Orchestration > Send mail




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Send mail  
Anja


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-09-06 10:52 PM

Hi everyone....
I have the following problem:
"I must send a mail to different addresses".

I have this stored procedure:

CREATE PROCEDURE _select_mail
AS
SELECT _flusso_mail.idflusso, _fatturatore.email
from _flusso_mail left join _fatturatore on _flusso_mail.codresp =
_fatturatore.codfatt for xml auto, xmldata
GO

that return me an xml document and give me the email address (email) and the
email subject (idflusso), but both can't be promoted!! It'is also possible
that the <_fatturatore> is empty.

This is the xml returned:

<?xml version="1.0" encoding="utf-16"?>
<RequestMail xmlns="http://createmail1">
<Schema name="Schema1" xmlns="urn:schemas-microsoft-com:xml-data"
xmlns:dt="urn:schemas-microsoft-com:datatypes">
<ElementType name="_flusso_mail" content="eltOnly" model="closed"
order="many">
<element type="_fatturatore" maxOccurs="*" />
<AttributeType name="idflusso" dt:type="string" />
<attribute type="idflusso" />
</ElementType>
<ElementType name="_fatturatore" content="empty" model="closed">
<AttributeType name="email" dt:type="string" />
<attribute type="email" />
</ElementType>
</Schema>
<_flusso_mail xmlns="x-schema:#Schema1" idflusso="20060308_001__3300">
<_fatturatore />
</_flusso_mail>
<_flusso_mail xmlns="x-schema:#Schema1" idflusso="20060308_001__3500">
<_fatturatore />
</_flusso_mail>
<_flusso_mail xmlns="x-schema:#Schema1" idflusso="20060308_852__0200">
<_fatturatore email="egennari@cpl.it" />
</_flusso_mail>
</RequestMail>

How I can resolve this problem???
And which are the steps that I must follow????

Thanks
Anja





[ Post a follow-up to this message ]



    Re: Send mail  
Greg Forsythe


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-09-06 10:52 PM

You can use a loop with xpath expressions.
create a counter variable =1

Loop Start
Expression shape
Subject = xpath(addressMessage, string("/*[local-name()='RequestMail' an
d
namespace-uri()='http://createmail1']/*[local-name()='_flusso_mail' and
namespace-uri()='x-schema:#Schema1' and position()=" + counter +
"]/@*[local-name()='idflusso' and namespace-uri()='x-schema:#Schema1']")
);
Address = the same again selecting <_fatturatore />
Decide address length > 0
Send
Loop

Greg

"Anja" <anjagrillo@infinito.it> wrote in message
news:A94F9414-A7B8-497F-992C-F26D88DBB894@microsoft.com...
> Hi everyone....
> I have the following problem:
> "I must send a mail to different addresses".
>
> I have this stored procedure:
>
> CREATE PROCEDURE _select_mail
> AS
> SELECT _flusso_mail.idflusso, _fatturatore.email
> from _flusso_mail left join _fatturatore on _flusso_mail.codresp =
> _fatturatore.codfatt for xml auto, xmldata
> GO
>
> that return me an xml document and give me the email address (email) and
> the
> email subject (idflusso), but both can't be promoted!! It'is also possible
> that the <_fatturatore> is empty.
>
> This is the xml returned:
>
> <?xml version="1.0" encoding="utf-16"?>
> <RequestMail xmlns="http://createmail1">
>   <Schema name="Schema1" xmlns="urn:schemas-microsoft-com:xml-data"
> xmlns:dt="urn:schemas-microsoft-com:datatypes">
>      <ElementType name="_flusso_mail" content="eltOnly" model="closed"
> order="many">
>         <element type="_fatturatore" maxOccurs="*" />
>         <AttributeType name="idflusso" dt:type="string" />
>         <attribute type="idflusso" />
>      </ElementType>
>      <ElementType name="_fatturatore" content="empty" model="closed">
>         <AttributeType name="email" dt:type="string" />
>         <attribute type="email" />
>      </ElementType>
>   </Schema>
>   <_flusso_mail xmlns="x-schema:#Schema1" idflusso="20060308_001__3300">
>      <_fatturatore />
>   </_flusso_mail>
>   <_flusso_mail xmlns="x-schema:#Schema1" idflusso="20060308_001__3500">
>      <_fatturatore />
>   </_flusso_mail>
>   <_flusso_mail xmlns="x-schema:#Schema1" idflusso="20060308_852__0200">
>      <_fatturatore email="egennari@cpl.it" />
>   </_flusso_mail>
> </RequestMail>
>
> How I can resolve this problem???
> And which are the steps that I must follow????
>
> Thanks
> Anja







[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 12:57 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register