ddhull Posted June 23, 2005 Posted June 23, 2005 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]&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]&subject=Music Connection has received your BOM',concat('Title:',$bz/fmrs:field[@name='title']/fmrs:data[1],'
','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
Martin Brändle Posted June 26, 2005 Posted June 26, 2005 Hmm. I don't know. Did you configure the mail option in the FMSA Web Publishing admin console?
ddhull Posted June 27, 2005 Author Posted June 27, 2005 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
ddhull Posted June 27, 2005 Author Posted June 27, 2005 I have my smtp correct now. I tried this but still get false when trying to send mail through .xsl biz. Thanks again, Doug
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now