Skip navigation
Currently Being Moderated

Parsing XML: Sending multiple emails

Apr 28, 2010 11:52 AM

I have my email event working correctly, but I know need to accept a list of emails(to,from,body etc), and send each email from the xml passed in.

 

The schema is as follows:

<?xml version="1.0" encoding="utf-8"?>

<xs:schema id="SendEmailList"
    targetNamespace="http://tempuri.org/SendEmailList.xsd"
    elementFormDefault="qualified"
    xmlns="http://tempuri.org/SendEmailList.xsd"
    xmlns:mstns="http://tempuri.org/SendEmailList.xsd"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
>
    <xs:element name="SendEmailList" type="SendEmailList"/>

    <xs:complexType name="SendEmailList" >
        <xs:sequence>
            <xs:element name="SendEmail" type="SendEmail" />
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="SendEmail" >
        <xs:sequence>
            <xs:element name="EmailTo" type="xs:string" />
            <xs:element name="EmailFrom" type="xs:string" />
            <xs:element name="EmailSubject" type="xs:string" />
            <xs:element name="EmailCC" type="xs:string" />
            <xs:element name="EmailBCC" type="xs:string" />
            <xs:element name="EmailBody" type="xs:string" />
            <xs:element name="EmailType" type="xs:string" />
        </xs:sequence>
    </xs:complexType>
</xs:schema>

 

Based on the EmailType, how can I get each that email, and send it only once?

 
Replies

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points