Database mail is not sending mails

  • Hi,

    I am trying to use database email in sql server 2005. But my mail getting queued.

    EXEC msdb.dbo.sysmail_help_status_sp ;

    STARTED

    EXEC msdb.sys.sp_helprolemember 'DatabaseMailUserRole' ;

    I am a member of DBROle

    EXEC msdb.dbo.sysmail_help_queue_sp @queue_type = 'mail' ;

    Output : mail17NOTIFIED2008-03-28 00:02:44.9272008-03-28 00:02:44.973

    SELECT sent_account_id, sent_date FROM msdb.dbo.sysmail_sentitems ;

    output : nothing

    EXEC msdb.dbo.sp_send_dbmail

    @profile_name = 'DBMail',

    @recipients = zzzz@xxx.com,

    @body = 'The stored procedure finished successfully.',

    @subject = 'Automated Success Message'

    Output: mail queued.

    select * from sysmail_allitems

    sent status : unsent

    Any suggestions ???

    Thank you,

    V

  • On the SQL server host, ensure your SMTP relay is accepting connections on TCP 25 (i.e. telnet YOURSMTPSERVERNAME 25). Test SMTP all the way through, for more information refer to http://support.microsoft.com/kb/153119

  • Hi,

    Thank you for the link.

    I don't have much knowlwdge on windows side. My understading the link says : For example, if you are having problems sending over SMTP between two of your Microsoft Exchange 2000 Server servers.

    In our case, we are not communicating with exchange server, I am not sure whether we need to ?

    We have SMTP service with in IIS.

    SMTP is running on port 25, thats all I can say, I am not sure whether its able to communicate or not.

  • NP 🙂

    The same principals apply - i.e. first ensure that your SMTP relay is listening by select start->run->cmd->type: telnet MYSMTPSERVERNAME 25

    If it returns a blank command window this confirms SMTP is active and you can access it via TCP.

    Next, reference the above article to send a test message via telnet; another example (http://www.yuki-onna.co.uk/email/smtp.html)

    The idea is to ensure your SMTP relay is configured properly before moving on to troubleshooting database mail 🙂

  • You will then need to delcare where you are sending the email from:

    HELO local.domain.name - dont worry too much about your local domain name although you really should use your exact fully qualified domain name as seen by the outside world the mail server has no choice but to take your word for it as of RFC822-RFC1123.

    This should give you:

    250 mail.domain.ext Hello local.domain.name [loc.al.i.p], pleased to meet you

    Now give your email address:

    MAIL FROM: mail@domain.ext

    Should yeild:

    250 2.1.0 mail@domain.ext... Sender ok

    If it doesn't please see possible problems.

    Now give the recipients address:

    RCPT TO: mail@otherdomain.ext (given our domain)

    Should yeild:

    250 2.1.0 mail@otherdomain.ext... Recipient ok

    If it doesn't please see possible problems.

    To start composing the message issue the command DATA

    After Issuing DATA command its saying 452.4.3.1 out of memory what is that means ?

    Thanks again!!!

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

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