Database Mail setup

  • Hi All,

    I am currently upgrading one of our sql boxes to sql 2005 and i have setup database mail which works fine, however one problem i am finding is that when i send a mail using the db_send_mail i have to specify the full email address, ie johnm@mycompany.co.uk whereas with sql 2000 and xp_sendmail i could just send to johnm.

    Have i missed something in the config or is this just the way it is in 2005?

    Regards

    John

  • Database Mail and SQL Mail both are different and DB mail requires SMPT Server.Higher versions of SQL Server dont have SQL Mail by default.

    Check these links

    http://technet.microsoft.com/en-us/library/ms175887.aspx

    http://technet.microsoft.com/en-us/library/ms177418.aspx

  • Thanks for the response, however i understand that the two mail types use different protocols, i just dont understand why sql mail will resolve names without the domain and db mail wont.

  • Hope u have outlook express on ur machine and mail configured on that..

  • What would having outlook express on my machine do for me?

  • Dont u have mail configures on ur system???

  • Yes we have an exchange server and the profile i am using is on that server. Database mail is configured to use a profile called syssql and the test etc works fine, sp_send_dbmail works fine, the agent notifications to operators works fine. I dont have an issue with the profile.

    My question was why i have to write the whole email address ie johnm@mycompany.co.uk and i cant just write johnm, as i always used to on the other servers

  • In SQL 2005, SQL Mail (which I believe is equivalent to the way SQL 2K sends email) uses an Exchange profile, which is what allows it to talk to Exchange and resolve short names and correctly address email. Database Mail, on the other hand, just uses an SMTP server, which doesn't know anything about your Exchange server, so you have to provide a complete email address.

  • MIJ (1/7/2008)


    In SQL 2005, SQL Mail (which I believe is equivalent to the way SQL 2K sends email) uses an Exchange profile, which is what allows it to talk to Exchange and resolve short names and correctly address email. Database Mail, on the other hand, just uses an SMTP server, which doesn't know anything about your Exchange server, so you have to provide a complete email address.

    Excellent, cheers MIJ. Bit of a pain in the backside but at least now i know i didnt miss something.

Viewing 9 posts - 1 through 8 (of 8 total)

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