SQL 2005 DBmail via SMTP server

  • I am trying to send email messages using the SQL 2005 DBmail via SMTP server.

    but i am getting the followin error:

    The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 13 (2009-02-13T04:46:42). Exception Message: Cannot send mails to mail server. (Syntax error in parameters or arguments. The server response was: Syntax: EHLO hostname).

    any ideas?

  • Are you sure you have the proper SMTP server address?

    Check with your messaging team. They might have more details on the nature of the error or be able to help you trace the message call attempt.

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • thanks for the quick response.

    the same smtp address is working from the C# code, but it is not working from the db mail.

    we are using the smtp server from mail trust service

  • Let try to execute following script;

    EXEC msdb.dbo.sp_send_dbmail

    @profile_name = ' ',

    @recipients= ' ',

    @body = ' ',

    @subject = ' ',

    @file_attachments = ' '

    Can you re-reply the result of this query

  • And also let us know what the format of your SMTP address is, please. Or give us a dummy value which represents the name of your SMTP address.

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • it display the message as bellow

    Mail queued.

    but when i go to the databasemail-->view email log then i found the error.

    The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 13 (2009-02-13T05:57:30). Exception Message: Cannot send mails to mail server. (Syntax error in parameters or arguments. The server response was: Syntax: EHLO hostname).

    )

    and it not send the mail

  • the smtp server is

    smtp.emailsrever.com

    port = 25

    mail format is like text message

  • A couple of questions:

    1) Are you absolutely SURE that the mail server you're trying to use supports SMTP mail and isn't just an exchange server?

    2) Are you using the actual servername and not "mail.MyServer.com"?

    3) Do you have database mail enabled on your Server, with a default profile set up and a database mail accounts?

    4) What service pack are you running on your server?

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • 1) it is a smtp server provided by the mailtrust.com, and the same smtp is running from the C# page.

    2) the server name is like smtp.emailserver.com which is running from the C#

    3) i have enabled the database mail and set the default profile also

    4) service pack 2

  • Ah. Third party vendors. HappyHappyJoyJoy. @=)

    I'd get mailtrust.com involved in this. It could be a domain trust issue or an error on their side or a firewall issue.

    Also, check with your network admin that you can send out these requests on port 25. They may have blocked that port on your firewall or block outgoing SMTP requests.

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • Did you try to send a Test DBmail:

    Management-->>Database mail--->>right click, send Test-Email...

    See what will happen.

  • I'm gonna go out on a limb here, because I have done it before, and say to check the spelling of your mail server. I noticed above you put it in as smtp.emailsrever.com instead of what I am betting it is, smtp.emailserver.com. I have misspelled server names and SMTP addresses when setting up DBMail and couldn't figure it out until I thought to check the spelling.

    Just a thought.

    Chris

    Learning something new on every visit to SSC. Hoping to pass it on to someone else.

  • but i am not understanding why it is working from the C# code, or should i withdraw the service from the mailtrust.

    what's your experience related to mailtrust.

  • this is the same place from where i am sending the mail and checking the log

  • I have checked the smtp server name and it correct and is working from the C# coding

Viewing 15 posts - 1 through 15 (of 24 total)

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