Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sending Lotus Notes Mail From Shared Account Using VBA

Status
Not open for further replies.

BenSC

Technical User
Jul 24, 2001
43
GB
Dear All,
I currently use code to automatically send emails from my Lotus Notes account.
However, I now need to send these emails from a departmental Lotus account, which is causing a problem. Whenever the code sends an email from the dept account it incorrectly shows as if it has come from my own account.

From what I understand this is because I'm logging onto Notes using my own account and then using the dept database to send the email. Given that I haven't been able to obtain an ID file for the dept database, does anyone have an idea how I can solve this issue?

Many thanks in anticipation
Regards
Ben Cooper
 
The heading indicates that you are sending from VBA, in e.g. Word or Excel... Are you then using an agent within some Notes database? If 'yes' there is a 'quick fix' for most agents if you're running R6 or newer:

Within the agent properties there is a setting for 'run agent as user' which can be set and identify the sender as something else as yourself. Then no password or ID file is needed.

If your NOT using any Notes databases (directly) it becomes slightly more complex since you don't have any access to the other user ID. CORBA is one potential option, but you will still need to use httppassword for login + DIOOP must run on the Domino server. COM via VBA is also a good possibility, but it seems to end up in the reality that there is a lacking password for the account - I assume...

Brgds,

TrooDOS
 
TrooDOS,
Thanks for the post. Unfortunately my company is still stuck in the dark ages of Notes R5.

You were correct in that I'm running this code from an Access module.
I'll be looking into your suggestions although I agree that it would be much easier if I could just log into the account directly and bypass this problem entirely.

Thanks again
Ben Cooper
 
Then there is of course no possibility to sign a Notes agent with the ID in question then either... No COM and no CORBA options. It becomes a bit limited then.

There is a few options left, like using either a separate LAN based SMTP server and 'spoof' the address and route it via your Domino server (depends on how strict the relay is set up on the Domino server), or use a servlet on the domino server and 'fake' the sender - using SMTP... Both are a bit more complex, but possible if nothing else works out. This is POSSIBLE but a little bit more 'iffy'. I don't know how much work there would be to interface VBA with SMTP either, so there could be a limit there too. It could also be a possibility if there exists native SMTP support. Then you can maybe forget a separate SMTP server, and use any VBA built in functions...

I think getting hold of the ID file and password is less troublesome, so I would have considered that as option 1, since you then can use the majority of your code 'as is'.

Or upgrade to R6? :)

Brgds,

TrooDOS
 
I forgot to mention another 'workaround' that will give you an 'replyto' option, but your name will still be listed as 'sent by'. Is that an option?

If 'yes', set the following fields in the memo (check for any typos in my field names):

doc.From = "Departmental Account/[OU1]/[Org]"
doc.Principal = doc.From
doc.ReplyTo = doc.From

Far from perfect, but try it and see. Without the 'replyto' the default reply address will be yours. Anyway, in R5 this is the 'easiest' solution...


Brgds,

TrooDOS
 
Ben,

Unfortuntaely I don't think I can solve your problem but I have a related query.

A quick question: you are using code to automatically send e-mails from your Notes Account. I use similar code but I cannot manage to bypass the notes password prompt. I posted previously under reference thread707-1174079 but have revceived no replies as of yet. Perhaps you might be able to point me in the right direction?

Thanks Simon.

 
TrooDOS - Thanks for your suggestions, I'll be giving them a try when I can get time.

Simon - I encountered the same problem with the notes password. I understand from other posts that this is a bug in the Microsoft API (I think) code. I haven't searched the Microsoft knowledge base yet, so they may have a solution, but it's just a guess.
I get around this by leaving my notes account running and turning the monitor off. It's not ideal though.
Apologies to not be of more help.
Ben C
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top