Database Mail in sql 2005

  • Hi, does any one knows how to use Database Mail in sql 2005? I have tested the database mail option, by right clicking it and send test mail, and its successful.

    Now I want to include a job step that can be used to send an email to the users once the job is complete.

    How do I achieve it through the database mail option.

    thanks,

    🙂

  • i hope there are option to send mail from there.

    or u can fire an sp calling mail sending sps

    Regards,

    Sandeep Bhutani

    http://net4techies.somee.com

    Regards,
    Sandeep Bhutani
    http://codersdiary.somee.com

  • thanks everyone,

    I got it ...you can use this in a job to send mail, once database mail is configured in sql 2005!!

    use msdb

    EXEC msdb.dbo.sp_send_dbmail

    @recipients=N'test@test.com',

    @body= 'Test Email Body',

    @subject = 'Test Email Subject',

    @profile_name = 'profilename'

    🙂

  • rinu philip (7/17/2008)


    thanks everyone,

    I got it ...you can use this in a job to send mail, once database mail is configured in sql 2005!!

    use msdb

    EXEC msdb.dbo.sp_send_dbmail

    @recipients=N'test@test.com',

    @body= 'Test Email Body',

    @subject = 'Test Email Subject',

    @profile_name = 'profilename'

    🙂

    I think database mail is a wonderful property in sql server 2005.

    SQL Mail in sql 2000 is replaced with Database Mail. This is a good thing, because SQL Mail relied on having a MAPI mail client installed such as Outlook in order for it to work. With SQL Server 2005, this has changed and now the mail services use an SMTP server to send out emails which makes it a whole lot easier to setup and maintain.

    🙂

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

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