writing in message in an email script

  • Hi Guys,

    I have to write the following message in an autogenerated email:

    Dear name surname,

    First sentence here.

    Second sentence here.

    Regards

    DBA

    Does anyone know how I can go to the next line as indicated above, I only have the following thus far:

    Set@message= N'Dear ' + @username + ','

    Please help!

    IC

  • Imke Cronje (4/17/2008)


    Hi Guys,

    I have to write the following message in an autogenerated email:

    Dear name surname,

    First sentence here.

    Second sentence here.

    Regards

    DBA

    Does anyone know how I can go to the next line as indicated above, I only have the following thus far:

    Set@message= N'Dear ' + @username + ','

    Please help!

    IC

    Try this:

    set @message = N'Dear ' + @username + ',' + char(13)+char(10)+char(13)+char(10) --char(13) is carriage return, char(10) is line feed

    set @message = @message + 'First sentence here.' + char(13)+char(10)+char(13)+char(10)

    set @message = @message + 'Second sentence here.' + char(13)+char(10)+char(13)+char(10)

    set @message = @message + 'Regards' + char(13)+char(10)

    set @message = @message + 'DBA'

  • Thank you so much. It works.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply