Send Mail without mail client?

  • I have been tasked to create a stored procedures that e-mail's managers when certain data comes within 30 days. I would love to use the SQL Mail but it requires a local mail client installed to use it.

    Our company is very strict with server configuration and will not allow a mail client on the SQL server.

    Is there another way to send e-mails from stored procedures?

    Is there an argument to their concerns about installing a mail client on the server?

    Thanks,

  • You will need at least a full version of Outlook on the box. If the server is in the domain you can set it up on Exchange otherwise you will need to go the POP/SMTP route which is the problem I am currently having.

  • There are many other approaches to send emails from an SQL Server, such as CDONT. You do not need any mail server to implement your tasks.

  • Could you please provide these many methods? Looking into the CDONT option and have yet to find a satisfactory explanation of how to implement it.

  • My advice, steer clear of SQLMail ... even Microsoft doesn't like it.

    CDOSYSMail is a fantastic alternative that I'd recommend looking into:

    http://sqlforums.windowsitpro.com/web/forum/messageview.aspx?catid=60&threadid=46350&enterthread=y

  • Go up to the Search box on this page, and do a search on CDO. You will find many hits, and one or more of them may be quite helpful in what you are trying to do.

    😎

  • wouldn't xp_sendmail work in this scenario?

    SQL DBA.

  • $sanjayattray (2/22/2008)


    wouldn't xp_sendmail work in this scenario?

    That is SQLMail, which requires outlook on the SQL Server, aka it sucks.

  • Steve J. Larson (2/22/2008)


    Could you please provide these many methods? Looking into the CDONT option and have yet to find a satisfactory explanation of how to implement it.

    You need to redirect towards CDOSYS. CDONT is antiquated, and currently considered outdated and a security flaw.

    As to installing it - you can get it from here:

    http://www.microsoft.com/downloads/details.aspx?FamilyID=E17E7F31-079A-43A9-BFF2-0A110307611E&displaylang=en

    As to how to use it - it's over here:

    http://support.microsoft.com/kb/312839/en-us

    ----------------------------------------------------------------------------------
    Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?

  • Matt, Perfect, it was CDOSYS i was trying to come up with when I suggested doing a serach on CDO on this site!

    😎

  • Thank you all for the CDO tips. This helped solve my SQLMail issue as well it just took a little time to get one of my programmers to take a look at it. Now I can mail from servers that are not in our domain. Very nice.

Viewing 11 posts - 1 through 10 (of 10 total)

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