Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7089 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I was trying to use code I found from this forum to send_mail after adding a record. This is my calling page to send the mail. My data gets added the the database but the "email_status" is never true(). Any idea what the problem is, I tried 2 ways of doing this.

 

The 1st way

.

<xsl:variable name="record" select="/fmrs:fmresultset/fmrs:resultset/fmrs:record[1]"/>

<xsl:variable name="subject" select="$record/fmrs:field[@name = 'title']/fmrs:data[1]"/>

<xsl:variable name="description" select="$record/fmrs:field[@name = 'description']/fmrs:data[1]"/>

.

.

<td><xsl:value-of select="$subject"/></td>

<td><xsl:value-of select="$description"/></td>

.

.

<xsl:variable name="email_status" select="fmxslt:send_email(concat('[email protected][email protected]&amp;subject=',$subject),concat('The following e-mail is for you: ',$description))"/>



The 2nd way

.

<xsl:variable name="bz" select="fmrs:resultset/fmrs:record[1]"/> 

<xsl:variable name="email_status" select="fmxslt:send_email('[email protected][email protected]&amp;subject=Music 

Connection has received your BOM',concat('Title:',$bz/fmrs:field[@name='title']/fmrs:data[1],'&#xD;','Description:',$bz/fmrs:field[@name='description']/fmrs:data[1]))"/>  



Then to test if email was sent I do the following:

        <!-- this checks if e-mail was sent -->

        <xsl:choose>

          <xsl:when test="$email_status = true()">

            <p>E-mail has been sent.</p>

          </xsl:when>

          <xsl:otherwise>

            <p>E-mail error.</p>

          </xsl:otherwise>

        </xsl:choose>

 

Thanks for any help,

Doug

Posted

In the fmsa web publishing admin console in publishing engine, xslt publishing both "requests and output pages" and "email messages" are set to utf-8.

Any other suggestions.

The other day I never did get them links to work either.

Thanks,

Doug

Posted

I have my smtp correct now. I tried this but still get false when trying to send mail through .xsl biz.

Thanks again,

Doug

This topic is 7089 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.