Avatar of pernicek
pernicek
Flag for Czechia asked on

Lotus Notes vs VBA offline e-mail sending

Hi @ all,

I'm developing solution for my wordwide partner from switzerland. It sending e-mail from word, excel via Lotus Notes Automation classes, VB for applications.Everything works well, but we cannot send e-mails offline.

We are using mail.box file of user and the document.save method. It appears good, we can see the mail in items to sent via Lotus Notes GUI, but when user synchronize, it shows general error with no other description. I have attached source code.

I have attached module LotusNotes.bas, which is actually used for sending mails. There are used some function from other modules, such as recipient detection & else, which are not directly participating on described error.

I can send whole (.docx) file if required.
Lotus IBMMicrosoft ExcelMicrosoft Word

Avatar of undefined
Last Comment
Steve Knight

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Steve Knight

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
larsberntrop

tip: send a memo from the user, and check which other field need to be set. I am guessing that the replicator does not like mail without a sender name.

You can get more information on the fields you find in the example mail.  This webiste describes Calendaring and scheduling which is an extension of the Mail functionality.  So it contains a little too much info, but will help you along deciding what to put in the fields you do find in your own example mail.

Also, it would be helpful if you included the error message you are receiving.
pernicek

ASKER
At dragon-it,

as you can see in attached bas file, we are using the same way to connect database.

In first version (attached is third) we had the same way as you, to send mail both online and offline.

But when you were offline, an error was occured: database object was empty, so we decided to change way and store mails directly to mail.box file, but lotus not send them when synchronize.

That's the point of problem.

At larsberntrop: Thanks for tip, we believe, that we are missing some items (like senders name) in offliíne version. I will try you solution and let you know.
Steve Knight

Ok, the part I looked at you were getting the mail server and name from the notes.ini file?  This used OpenMail which for me works regardless of offline or not when the user had local mail file but maybe not in your environment?

Steve
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
pernicek

ASKER
Only some users have local replica, but i feel (tested by other person) that this results in described exception.
Sjef Bosman

If you don't have a local replica, mail replication usually is inactive.
Steve Knight

Thanks for selecting my answer, though not for the "B" grade, I hasn't seen the last few comments there at the time.

Frankly if there mail clients are setup with locations that the user uses such as the default just "Island" and "Office" pointing to a server mail file then there is no local mail facility.  There may be a mail.box or local mail replica but that is irrelevant as nothing specifically does anything with them.

If they have been defined with an "offline mail" and "online mail" location or similar aswell and local sceduled replication is turned on then yes dropping a mail in mail.box while in offline state should send as soon as they replicate or it is scheduled to run.

So mainly it is down to how the client is configured, but using notesdb.openmail rather than reading notes.ini should work.  If they are truly offline and no local replica / replication then I would suggest storing a transaction in your applications perhaps which could be retried later.

Better though would be to configure the notes clients with local replicas if they are expected to work offline.

Steve
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.