Strange problem.

  • Hi,

    This is more than likely an Outlook problem but as the message is being created in T-SQL (SQL 2000) I thought I would ask here.

    Declare @MessageBody nvarchar(4000)

    select @MessageBody = Letter from StandardLetter

    exec master.dbo.xp_sendmail

    @recipients= 'grayd@turpin-distribution.com',

    @message= @MessageBody,

    @subject= 'This is a Test',

    @type= 'HTML'

    The column Letter is basically an email body with a couple of substitution characters in it.

    The text is all Roman alphabet with a couple of French accented characters but certainly nothing out the ordinary.

    When I open the message in Outlook (2007) I get an alert box which says

    'The custom form cannot be opened. Outlook will use an outlook form instead. The object could not be found'

    The email also cannot be printed.

    'One or more of the items you tried to print does not support printing and was not printed'

    Anyone come across this before?

    Even if I put 'Hello World' into the @message variable I still get the same thing.

    Regards

    Dave

  • Have you tried sending the email as plain text instead of HTML to see if that works?

    Like you said it sounds like an Outlook issue. Can you send the email to another person or check your email from another PC? You could do a repair of the Outlook installation as well.

  • Hi,

    Yes I've tried both 'TEXT' and 'HTML', makes no difference.

    I sent the email to a collegue, they did not get the first error but go the second one when trying to print out the meail.

    Dave

    Jack Corbett (9/24/2008)


    Have you tried sending the email as plain text instead of HTML to see if that works?

    Like you said it sounds like an Outlook issue. Can you send the email to another person or check your email from another PC? You could do a repair of the Outlook installation as well.

  • david.gray (9/24/2008)


    Hi,

    Yes I've tried both 'TEXT' and 'HTML', makes no difference.

    I sent the email to a collegue, they did not get the first error but go the second one when trying to print out the meail.

    Dave

    Was it with the "Hello World" message or the message with special characters (the accents)?

  • Jack Corbett (9/24/2008)


    david.gray (9/24/2008)


    Hi,

    Yes I've tried both 'TEXT' and 'HTML', makes no difference.

    I sent the email to a collegue, they did not get the first error but go the second one when trying to print out the meail.

    Dave

    Was it with the "Hello World" message or the message with special characters (the accents)?

    The accents are contained in the variable @MessageBody which is returned from a table.

    Either way I get the same Outlook error message so it's not down to the data.

  • Are there other emails being sent via xp_sendmail from that server? If yes, are they ok?

    You might want to open up Outlook on the server and see if there any option set to use a different form. You'll probably have to log in using the same account as SQL server to do this.



    Alvin Ramard
    Memphis PASS Chapter[/url]

    All my SSC forum answers come with a money back guarantee. If you didn't like the answer then I'll gladly refund what you paid for it.

    For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]

Viewing 6 posts - 1 through 5 (of 5 total)

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