Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Send mail in MS Outlook
#1
I tried

Macro Macro5
Code:
Copy      Help
typelib Outlook {00062FFF-0000-0000-C000-000000000046} 9.0


Outlook.Application a._getactive
Outlook.MailItem aa=a.CreateItem(Outlook.olMailItem)
aa.To="Doe, John"
aa.Subject="test"
aa.Send

but a message of security appears.

Is there any way of do it automatically?
#2
To close securiy message, before sending launch another thread (mac) that waits for the message and closes it.
#3
I tried

Function close
Trigger !ca"Microsoft Outlook" "#32770"     Help - how to add the trigger to the macro
Code:
Copy      Help
int hwnd=val(_command)
wait 0 WE id(4774 win("Microsoft Outlook" "#32770"))
but id(4774 hwnd)

but it doesn't work.
#4
This program: http://www.contextmagic.com/express-clickyes/ fix it.

Is possible with QM?
#5
lef also does not work? I used it in System function MailCWM.
#6
with lef:

Error (RT) in Macro5: 0xA0E04005, ----> aa.Send

(but I try run the function in lock computer)
#7
When computer locked, QM will not close the message.
#8
Do you know another way to send mail in MS Outlook when the computer is locked?
#9
No. Why need to send using Outlook? Maybe you can get data from Outlook and send it using SendMail.
#10
MS Outlook is the program used where I work.
#11
I found http://www.dimastr.com/redemption/

Can you help me to use it in QM?
#12
Look in QM help, "Using COM components" topic.
Does it not work when you use standard COM component code, like this?

typelib ...
SomeClass var._create
var.SomeFunction(...)
#13
I tried to convert

dim SafeItem, oItem
set SafeItem = CreateObject("Redemption.SafeMailItem") 'Create an instance of Redemption.SafeMailItem
set oItem = Application.CreateItem(0) 'Create a new message
SafeItem.Item = oItem 'set Item property
SafeItem.Recipients.Add "somebody@somewhere.com"
SafeItem.Recipients.ResolveAll
SafeItem.Subject = "Testing Redemption"
SafeItem.Send

without success.
#14
not tested
Macro Macro630
Code:
Copy      Help
typelib Outlook {00062FFF-0000-0000-C000-000000000046} 9.0
Outlook.Application a._getactive

IDispatch SafeItem, oItem
SafeItem._create("Redemption.SafeMailItem")
oItem=a.CreateItem(0)
#15
It works.

Thanks.
#16
This code is easier and also works.


Macro Macro10
Code:
Copy      Help
typelib Outlook {00062FFF-0000-0000-C000-000000000046} 9.0


Outlook.Application a._getactive
Outlook.MailItem aa=a.CreateItem(Outlook.olMailItem)
aa.To="Doe, John"
aa.Subject="test"
aa.Body="This is a test"
aa.Save
IDispatch SafeItem
SafeItem._create("Redemption.SafeMailItem")
SafeItem.Item = aa
SafeItem.Recipients.ResolveAll
SafeItem.Send

but I continue thinking, that type of protection will have the window ("a program is trying to automatically send e-mail...) so that (SendClickMessage, SendKey) in Yes button don't work.

Do you know another way?
#17
another way to click Yes without using mouse? No. The dialog uses some nonstandard input method for Yes button, maybe uses mouse hook.
#18
Quote:The dialog uses some nonstandard input method for Yes button, maybe uses mouse hook

Could you show me a example to try if works?
#19
not possible with qm.


Forum Jump:


Users browsing this thread: 1 Guest(s)