Results 1 to 14 of 14
  1. #1
    Join Date
    Jun 2004
    Location
    Long Island
    Posts
    696

    Unanswered: Database Mail - WTF ??????

    I've enabled DB Mail on a SQL 2005 SP2 (64bitVM), which was the easy part, having it actually successfully deliver a mail is an entirely different issue.

    Some notes:
    1. Port 25 is not blocked.
    2. I Can telnet to SMTP Server from the host,
    3. Can send an e-mail via sendemail.exe from the host.
    4. Admin acct is starting all sql services.
    5. Turned off AV, DatabaseMail90.exe is excluded from where necessary in McAfee.
    6. Installed and started SMTP service on Windows.
    7. sysmail_help_status_sp -> STARTED

    I'm ready to bang my head against the wall.
    Error (which tells a whole lot, not):
    Error:
    The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 (2008-08-04T17:08:07). Exception Message: Cannot send mails to mail server. (Command not implemented. The server response was: Command not implem
    -> this is where it ends

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Check dbmail is enabled in the Surface Area Configuration, and that the account sending mail is a member of the dbmail user role in the msdb database.
    George
    Home | Blog

  3. #3
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    George
    Home | Blog

  4. #4
    Join Date
    Jun 2004
    Location
    Long Island
    Posts
    696
    using sa from simplicity's sake.

  5. #5
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,800
    Provided Answers: 11
    You may want to talk to your mail admins to see if they can find one of your messages in their logs. Some mailhubs have rules about who can send messages to prevent spoofing or spamming. One of ours that hooked someone was the replyto address must appear valid.

  6. #6
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    You mention that you're using VM, as in VMWare?
    I'm wondering if this is causing the issues..
    George
    Home | Blog

  7. #7
    Join Date
    Jun 2004
    Location
    Long Island
    Posts
    696
    Quote Originally Posted by georgev
    You mention that you're using VM, as in VMWare?
    I'm wondering if this is causing the issues..

    I tried it on a standalone server too, same result. Everything looks normal, mail items just never get delivered.

  8. #8
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Are you sure they're getting queued/sent?
    George
    Home | Blog

  9. #9
    Join Date
    Jun 2004
    Location
    Long Island
    Posts
    696
    sysmail_help_queue_sp @queue_type = 'Mail' ;
    mail 0 RECEIVES_OCCURRING 2008-10-21 17:27:56.323 2008-10-21 17:16:36.097



    EXECUTE dbo.sysmail_help_status_sp ;
    STARTED


    SELECT is_broker_enabled FROM sys.databases WHERE name = 'msdb' ;
    1

    Items are not making it to the SMTP server, just checked with Messaging guys.
    Last edited by PMASchmed; 10-21-08 at 14:50.

  10. #10
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,800
    Provided Answers: 11
    What do you get from this command:
    Code:
    exec msdb..sp_send_dbmail @profile_name = your profile name,
    	@recipients = your email address,
    	@subject = 'Test eMail',
    	@body = 'test email.  Please ignore'
    And what the heck is this with all the DB Mail questions all at once?

  11. #11
    Join Date
    Jun 2004
    Location
    Long Island
    Posts
    696
    [MCrowley]What do you get from this command:
    Code:
    exec msdb..sp_send_dbmail @profile_name = your profile name,
    	@recipients = your email address,
    	@subject = 'Test eMail',
    	@body = 'test email.  Please ignore'
    "Mail queued", but nothing happens, only error as in first item in this thread.

    And what the heck is this with all the DB Mail questions all at once?
    ????

  12. #12
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,800
    Provided Answers: 11
    GeorgeV has a DBMail question out there, as well.

    Mail Queued is the right response. Not sure why the mail is not coming through, then.

    what is the operating system? Is there a local firewall involved?

  13. #13
    Join Date
    Jun 2004
    Location
    Long Island
    Posts
    696
    The odd thing is a "hack" that I implemented works fine. I setup a proxy account, enabled xp_cmdshell and ...

    xp_cmdshell 'sendemail.exe -f mail@SQLStinks.com -s SMTPServer ....' works for sending email items. I'm just not crazy about making o/s calls for sending mail items, nor having xp_cmdshell enabled for non admin accounts.

    No firewall

    Windows Server 2003 on a VMWare VM. I also tried on a standalone 2005 server, same crap. This is why I purchased ActiveBatch.

  14. #14
    Join Date
    Jun 2004
    Location
    Long Island
    Posts
    696
    DatabaseMail90.exe cannot use HELO to relay messages, it uses EHLO, so make sure your SMTP server supports this or has it activated.

    I switched to another SMTP server that uses EHLO, and DBMail works no problem.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •