• Hi everyone,

    Just thought I'd add my 2 cents worth in here. I tried for a few days to resolve this issue, including:

    - Changing the logging level to verbose

    - The sys.xp_logininfo check

    For me, the SQL I was running in the @query parameter were running fine in SSMS, however were failing with this error when running from SQL Agent. Once I ran the mail SP in SSMS, not only did it show the error, but also details on what I was doing wrong.

    Not sure if that will be any help to people here or not.

    cheers, Mark