Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. How we can handle mails if exchange server is down

How we can handle mails if exchange server is down

Scheduled Pinned Locked Moved Database
databasesysadmin
7 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Anuj Banka
    wrote on last edited by
    #1

    How we can handle mails using trigger if exchange server is down. i Am sending mail on insert of any record in table through trigger. But if exchange server is down how we can handle mails.

    J 1 Reply Last reply
    0
    • A Anuj Banka

      How we can handle mails using trigger if exchange server is down. i Am sending mail on insert of any record in table through trigger. But if exchange server is down how we can handle mails.

      J Offline
      J Offline
      Johan Hakkesteegt
      wrote on last edited by
      #2

      We solved this problem, by sending emails through an application. The application will try to send the email as usual, but in case the exchange server is down, or the email can not be sent for some other reason, all relevant data (addresses, message body, etc.) is stored into a database table instead. Another application then checks the table periodically, and will attempt to send any message there. If sending is successful the app will flag the message as sent.

      My advice is free, and you may get what you paid for.

      A 1 Reply Last reply
      0
      • J Johan Hakkesteegt

        We solved this problem, by sending emails through an application. The application will try to send the email as usual, but in case the exchange server is down, or the email can not be sent for some other reason, all relevant data (addresses, message body, etc.) is stored into a database table instead. Another application then checks the table periodically, and will attempt to send any message there. If sending is successful the app will flag the message as sent.

        My advice is free, and you may get what you paid for.

        A Offline
        A Offline
        Anuj Banka
        wrote on last edited by
        #3

        thanks bro but i dont want use another application to send mails. I want to send mails through triggers. I know we can use web service to send mail. But i m tring to send mails through triggers.

        J 1 Reply Last reply
        0
        • A Anuj Banka

          thanks bro but i dont want use another application to send mails. I want to send mails through triggers. I know we can use web service to send mail. But i m tring to send mails through triggers.

          J Offline
          J Offline
          Johan Hakkesteegt
          wrote on last edited by
          #4

          The core problem is, what happens when your trigger is unable to send a message, right? The question is what do you want to happen? Should your solution use an alternative medium (for example POP)? But what if the connection between the database server and the rest of the network is broken? Then you won't be able to access any alternative at all. From your original message I understand that you are already sending emails through triggers. Why not use our approach, but adapted to work with triggers? Trigger --> if sending message fails --> message to table SQL job --> check table every minute or so --> send message using same code you are using in your triggers Message sent successful --> flag message in table as sent or delete from table.

          My advice is free, and you may get what you paid for.

          A 1 Reply Last reply
          0
          • J Johan Hakkesteegt

            The core problem is, what happens when your trigger is unable to send a message, right? The question is what do you want to happen? Should your solution use an alternative medium (for example POP)? But what if the connection between the database server and the rest of the network is broken? Then you won't be able to access any alternative at all. From your original message I understand that you are already sending emails through triggers. Why not use our approach, but adapted to work with triggers? Trigger --> if sending message fails --> message to table SQL job --> check table every minute or so --> send message using same code you are using in your triggers Message sent successful --> flag message in table as sent or delete from table.

            My advice is free, and you may get what you paid for.

            A Offline
            A Offline
            Anuj Banka
            wrote on last edited by
            #5

            thanks for ur response i m agree with ur answer. i think taking flag is better option.

            J 1 Reply Last reply
            0
            • A Anuj Banka

              thanks for ur response i m agree with ur answer. i think taking flag is better option.

              J Offline
              J Offline
              Johan Hakkesteegt
              wrote on last edited by
              #6

              Your welcome, however please vote "5" or "good answer" next time. You have marked my answer as bad.

              My advice is free, and you may get what you paid for.

              A 1 Reply Last reply
              0
              • J Johan Hakkesteegt

                Your welcome, however please vote "5" or "good answer" next time. You have marked my answer as bad.

                My advice is free, and you may get what you paid for.

                A Offline
                A Offline
                Anuj Banka
                wrote on last edited by
                #7

                ohh sorry i dont know...i don't do it intensionally

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups