Sending mail using sp_SMTPMail fails

Posted on 2005-04-27
Last Modified: 2011-09-20
We have an SQL2000 server which I've configured SQL Mail.
Intesting - It works fine.

Set up a Mail profile on the Server under the user that the services start under.
Can send/receive e-mail via Outlook 2000
Open SQL Server Agent / Properties / Configure Mail Profile / Log on as domain account
Operator configured
Test mail works.

However, when our SQL Developer executes the following code from a script - It fails.

exec sp_SMTPMail
@SenderName='SALT SQL Server',
@RecipientAddress = '',
@CCRecipientAddress = '',
@BCCRecipientAddress = '',
@Subject='SQL  Test', @body='Test e-mail'

Obviously, there's something missing, like telling it what profile to use or something.
I have Outlook installed {would prefer to NOT have it installed and use SMTP [help]}.

Any help is GREATLY appreciated.
Question by:matthewjones
    LVL 4

    Expert Comment

    whats the error that you are getting?
    LVL 75

    Accepted Solution

    >>I have Outlook installed {would prefer to NOT have it installed and use SMTP [help]}.<<
    Than don't.  Use this instead and sve yourself the grief:
    XPSMTP.DLL - SQL Server SMTP Mail XP
    LVL 34

    Expert Comment

    agree with acperkins on this one :)

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Join & Write a Comment

    Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
    Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
    Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
    Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now