I'm not trying to connect to it so I can send an email through the server. What I was trying to understand how to do was to deliver and email to it. For example, if I build an SMTP server and a client which connects to my that SMTP server and I want to send an email to firstname.lastname@example.org (where mycompany.com is hosted on the Exchange server), how would the SMTP server I created connect to the Exchange server in order to deliver the email? Doesn't the Exchange server have to allow some sort of connection from outside the intranet in order to receive emails from other domains (gmail, yahoo, etc.)?
I'm going to have to try and do that, unfortunately the person who set it up is no longer with the company and we just have an outsourced IT company that maintains it and they usually aren't very help fully. However, because the web tools were able to connect to is it reasonable to assume the problem is on my end? I was thinking maybe because I dont have a domain name so if the Exchange server tries to lookup the IP address of my computer there is no MX or PTR record. Is this something SMTP servers look for?
I also found something that I dont know how to explain or how it may affect this. The MX record for the server list exchange.mycompany.com. However, even when I'm on VPN, I can't connect to the SMTP server using that address in telnet or the IP address it points to. I have to use remote.mycompany.com, which is shown in the SMTP banner and points to the SAME IP ADDRESS. Is there a setting in Exchange that makes it script only request coming from this address? If so, how do the online SMTP tools discover this subdomain when I only gave the tools the domain name (mycompany.com) and the MX record only shows exchange.mycompany.com? The address remote.mycomany.com is not located anywhere in the zone file.
Yes, using the Position() function did help but part 2 of this was still a lot more code that had to be added to complete what I needed to and I do not like it.
<b>How do we code for the mininum number of iternations when the input XML has less than the minimum?</b>
The Position did limit the output to the number of iterations we needed to see but it did nothing to fill in if the number of iterations was LESS that what we expected.
In our case the input XML had a length attribute. <pre lang="xml"> <Opt length="1"><Opts>data</Opts></Opt></pre>
So we had to add a bunch of if or choose statements <xls:if test="@length = "1"> ...fill put in 4 output empty values </xls:if> <xls:if test="@length = "2"> ...fill put in 3 output empty values </xls:if>
I haven't done anything like this before but I did a quick bit of hunting around and something like this might do it for you. Please note this is totally untested and is just an idea. I thought about how to do a while or a normal for loop in XSL and then try and find away of checking if the element at position x existed. This is cobbled together from a couple of SO posts and my own take on how to put it together.
From those articles this is what I have cobbled together:
<xsl:templatename="for_loop"><xsl:paramname="num">1</xsl:param> <!-- param has initial value of 1 -->
<xsl:paramname="limit"></xsl:param> <!-- this should be the expected number of opt elements, passed into the template -->
<xsl:iftest="not($num = $limit)"><xsl:choose><xsl:whentest="not(opt[position() = $num)"> <!-- true if the element DOES NOT exist -->
<!-- create your empty xml here -->
<!-- the element exists get the data and output that -->
</xsl:otherwise></xsl:choose><xsl:call-templatename="for_loop"><xsl:with-paramname="num"><xsl:value-ofselect="$num + 1"></xsl:with-param><xsl:with-paramname="limit"><xsl:value-ofselect="$limit"></xsl:with-param></xsl:call-template></xsl:if></xsl:template>