[Top] [All Lists]

Re: Variable in SMTP Protocol

Subject: Re: Variable in SMTP Protocol
From: Joe Webb
Date: Mon, 27 Nov 2006 06:40:53 -0600
Newsgroups: microsoft.public.sqlserver.notificationsvcs
Hi Kevin - 

I routinely do something like this in my emails. 

        <SqlExpression>'ABC Motorworks Press Release - ' + CONVERT
(NVARCHAR(30), GETDATE(), 101) 

Constants and functions are valid in the SqlExpression element. 


Joe Webb
SQL Server MVP

Get up to speed quickly with SQLNS 

I support PASS, the Professional Association for SQL Server.

On Tue, 21 Nov 2006 14:12:26 -0600, "Kevin Eckart"
<[email protected]> wrote:

>I would like to include a variable in the Subject field of an email sent 
>from Notification Services. Is there a way to do this? What is the 
>limitation of the <SQLExpression></SQLExpression> tag in the Protocol? Is 
>this where I would grab my variable?
>Below is the protocol portion of my ADF file. Any help would be greatly 
>Kevin E.
>    <Protocol>
>        <ProtocolName>SMTP</ProtocolName>
>            <Fields>
>                   <Field>
>                        <FieldName>Subject</FieldName>
>                        <SqlExpression>'HD Notification'</SqlExpression>
>                    </Field>
>                <Field>
>                    <FieldName>From</FieldName>
>                    <SqlExpression>N'[email protected]'</SqlExpression>
>                </Field>
>                <Field>
>                    <FieldName>To</FieldName>
>                    <SqlExpression>DeviceAddress</SqlExpression>
>                </Field>
>                <Field>
>                    <FieldName>Priority</FieldName>
>                    <SqlExpression>N'Normal'</SqlExpression>
>                </Field>
>                <Field>
>                    <FieldName>BodyFormat</FieldName>
>                    <SqlExpression>N'html'</SqlExpression>
>                </Field>
>            </Fields>
>          <ProtocolExecutionSettings></ProtocolExecutionSettings>
>    </Protocol>

<Prev in Thread] Current Thread [Next in Thread>