Mail Send Code, Need To Loop Through Multiple Servers
- From: Erick C <boricua2793@xxxxxxxxx>
- Date: Mon, 25 Jun 2012 10:34:14 -0700 (PDT)
I am hoping one of you experts out there can help me out. I have a bit of code right now that sends emails through Lotus Notes. It works fine, but if our primary mail server goes down and we run on the backup the code does not work. Currently we only have the primary server identified in the code "MAILS/CERT". If there is an error then it generates an error message later in the code.
I need to find a way to get the code to first try "MAILS/CERT", and if it cannot log in, then try "MAILS2/CERT". Unfortunately I am not experienced enough in VBA to figure out how to write the code to make it loop through these two myself. Any assistance I can get would be greatly appreciated. A protion of my code is below:
'startup Lotus notes and get object handle
Set s = CreateObject("Notes.notesSession")
server = "MAILS/CERT"
Database = "MAIL\fconfirm.nsf"
Set db = s.GetDatabase(server, Database)
On Error GoTo ErrorLogon
'see if user is logged on
Set doc = db.CreateDocument
On Error GoTo 0
- Prev by Date: Re: Export Subform Filter to Excel
- Previous by thread: Re: Export Subform Filter to Excel