URGENT! Sending mail from SQL via external SMTP server

  • Hi everyone,

    I am currently checking new records added to my table "Orders" daily. So I created a trigger that will send email to inform me upon a creation of new record.

    It is now able to send mail to my own domain using xp_smtp_sendmail. However, I need it to send to my administrator's email instead.

    We are using external SMTP server. But there is no parameters to define this server address. The parameter @server is only workable with my own domain IP address. May I know if there is any way to allow me to include my external SMTP server address and authentication details?

  • Have you tried a four part qualified name for the external SMPT servername (e.g. someServer.somePlace.someCompany.com)? You may also want to ensure that the server will relay messages originating in your domain (bots and spammers like to use relays to spam, so this can be shut down often).

    hth,

    Steve.

  • Hi,

    Nope. Because I am only given the IP address of the external SMTP server. Maybe to make myself clearer, I'll explain the process that I need to see happening:

    When a client creates a new order (new record in my Orders table), trigger is triggered and it will generate an email to send to my administrator's email account.

    But before it can reach my administrator, it taps the external server to use SMTP. By providing authentication, the server will approve this mail to pass through.

    Finally it will read the recipient email address to reach my administrator.

    What bugs me is that I cannot find any parameters (for xp_smtp_sendmail) that allows me to define both my domain and the server's IP address, nor are there any parameter to define authentication user id and password.

  • what about using db_mail? just put the external smtp server into the config

  • Hi,

    Is this: http://www.databasejournal.com/features/mssql/article.php/3626056

    what you are referring to? I am using sql server 2000. Thus I don't have this feature. Plus I saw the configuration for db_mail, it has the server name portion which is just like @server. >.< So isn't it just like xp_smtp_sendmail?

    Sorry.. I am a beginner in this.

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

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