Erick C
unread,Jun 25, 2012, 1:34:14 PM6/25/12You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
Hi everybody!
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