srinib
asked on
Auto Click YES when Outlooks Security Guard opens prompt dialog
Hi All,
"A program is trying to access e-mail addresses you have stored in Outlook. Do you want to allow this?"
I am getting this annoying message when try to send an email.
Is there anyway to get rid of this annoying outllook message?
Note : I do not want to use any freewares for this.
Thanks in advance
Srinib
"A program is trying to access e-mail addresses you have stored in Outlook. Do you want to allow this?"
I am getting this annoying message when try to send an email.
Is there anyway to get rid of this annoying outllook message?
Note : I do not want to use any freewares for this.
Thanks in advance
Srinib
Heres a simple example on how to use the redemption dll
integer rc
oleobject oleSafeMailItem
oleobject oleTmp
oleobject oleOutlook
oleobject oleNameSpace
oleOutlook = create oleobject
rc = oleOutlook.ConnectToNewObj ect('Outlo ok.Applica tion')
oleNameSpace = oleOutlook.GetNameSpace('M API')
oleNameSpace.Logon('', '', true, true)
oleSafeMailItem = create oleobject
rc = oleSafeMailItem.ConnectToN ewObject(' Redemption .SafeMailI tem')
oleTmp = create oleobject
oleTmp = oleOutlook.CreateItem(0)
oleSafeMailItem.Item = oleTmp
oleSafeMailItem.Recipients .Add(abc@x yz.com')
oleSafeMailItem.Recipients .ResolveAl l
oleSafeMailItem.Subject = Using Redemption mail'
oleSafeMailItem.Send
if isValid(oleSafeMailItem) then destroy oleSafeMailItem
if isValid(oleNameSpace) then
oleNameSpace.logoff()
destroy oleNameSpace
end if
if isValid(oleOutlook) then
oleOutlook.DisconnectObjec t()
destroy oleOutlook
end if
integer rc
oleobject oleSafeMailItem
oleobject oleTmp
oleobject oleOutlook
oleobject oleNameSpace
oleOutlook = create oleobject
rc = oleOutlook.ConnectToNewObj
oleNameSpace = oleOutlook.GetNameSpace('M
oleNameSpace.Logon('', '', true, true)
oleSafeMailItem = create oleobject
rc = oleSafeMailItem.ConnectToN
oleTmp = create oleobject
oleTmp = oleOutlook.CreateItem(0)
oleSafeMailItem.Item = oleTmp
oleSafeMailItem.Recipients
oleSafeMailItem.Recipients
oleSafeMailItem.Subject = Using Redemption mail'
oleSafeMailItem.Send
if isValid(oleSafeMailItem) then destroy oleSafeMailItem
if isValid(oleNameSpace) then
oleNameSpace.logoff()
destroy oleNameSpace
end if
if isValid(oleOutlook) then
oleOutlook.DisconnectObjec
destroy oleOutlook
end if
ASKER
I am getting this popup at this below line.
ls_username = upper(iolenamespace.curren tUser.Name )
Let me know what code i should write before or after that line (using redemption dll).
Thanks for your time
Srinib
ls_username = upper(iolenamespace.curren
Let me know what code i should write before or after that line (using redemption dll).
Thanks for your time
Srinib
Srinib the code tha you've pasted is obviously yours and not mine . How cam i offer a opinion based on just one line of code .
First tell me did you try the code that i'd pasted ? Did it prompt you to click Yes ?
First tell me did you try the code that i'd pasted ? Did it prompt you to click Yes ?
ASKER
here is my code in the command button. You may not find the variable declaration as it is not pasted.
I did not worked on your code since i need to make the changes in the following code as i am doing maintenance work for this.
////////////////////////// ////////// ////////// ////////// ////////// /////////
Loop1:
lw_parent.WindowState = Normal!
if checkconnection() then
if not isvalid(g_session) then
g_session = CREATE mailSession
ls_username = upper(iolenamespace.curren tUser.Name )//Popup appears
mRet = g_session.mailLogon(ls_use rname,"")
if mRet <> mailReturnSuccess! then
MessageBox("Error","Unable to establish contact with email client. Please contact System Administrator")
end if
end if
g_session.mailAddress(i_ma ilmessage)
if UpperBound(i_mailmessage.R ecipient) > 0 then
mle_to.text = ""
for ll_loop = 1 to UpperBound(i_mailmessage.r ecipient)
ls_recipient = i_mailmessage.recipient[ll _loop].nam e
if ll_loop = 1 then
mle_to.text = ls_recipient
else
mle_to.text = mle_to.text + "; " + ls_recipient
end if
next
else
return
end if
else
lw_parent.WindowState = Minimized!
reconnectsqlca()
GOTO Loop1
end if
Thanks again
Srinib
I did not worked on your code since i need to make the changes in the following code as i am doing maintenance work for this.
//////////////////////////
Loop1:
lw_parent.WindowState = Normal!
if checkconnection() then
if not isvalid(g_session) then
g_session = CREATE mailSession
ls_username = upper(iolenamespace.curren
mRet = g_session.mailLogon(ls_use
if mRet <> mailReturnSuccess! then
MessageBox("Error","Unable
end if
end if
g_session.mailAddress(i_ma
if UpperBound(i_mailmessage.R
mle_to.text = ""
for ll_loop = 1 to UpperBound(i_mailmessage.r
ls_recipient = i_mailmessage.recipient[ll
if ll_loop = 1 then
mle_to.text = ls_recipient
else
mle_to.text = mle_to.text + "; " + ls_recipient
end if
next
else
return
end if
else
lw_parent.WindowState = Minimized!
reconnectsqlca()
GOTO Loop1
end if
Thanks again
Srinib
if you want to use Redemption dll the you need to follow certain steps of codes like the example i posted. The other alternative is to use extended mapi to prevent the security warning from being popped up.Unfortunatley PB doesnt support extended Mapi. Third option that you've is use jmail or funcky mail dlls.
Your above code uses normal MAPI so the security popup will appear. Check out with the people whom you are doing maintenace worj what option they would prefer .
Your above code uses normal MAPI so the security popup will appear. Check out with the people whom you are doing maintenace worj what option they would prefer .
ASKER
Thanks for you suggestion. I will ask my people on this and let you know if i need further help in couple of days.
Thanks
Srinib
Thanks
Srinib
ASKER
Sorry for the delay.
I have one question.
Is that Redemption.dll can be distrubuted along with application?
Or do we need to get the distributed version from the corresponding vendor?
I am getting the following message when regestering a dll.
1. This software product is licensed to you for the software development
purposes only.
This product may not be distributed or copied except for backup purposes.
2. If you need a distributable version, please visit
http://www.dimastr.com/Redemption/
Please let me know the details.
And also, i need your help on extending your sample code.
I need to get the mail ids from the address book instead hardcoding. Please help me on this.
Thanks again and again
Srinib
I have one question.
Is that Redemption.dll can be distrubuted along with application?
Or do we need to get the distributed version from the corresponding vendor?
I am getting the following message when regestering a dll.
1. This software product is licensed to you for the software development
purposes only.
This product may not be distributed or copied except for backup purposes.
2. If you need a distributable version, please visit
http://www.dimastr.com/Redemption/
Please let me know the details.
And also, i need your help on extending your sample code.
I need to get the mail ids from the address book instead hardcoding. Please help me on this.
Thanks again and again
Srinib
The redemption dll is not free for commercial use you will've to buy it .Check the site there are lot of examples around.
ASKER
OK..fine.
Can you please help me on other part.
I need to get the mail ids from the address book using your code instead hardcoding .
Thanks
Srinib
Can you please help me on other part.
I need to get the mail ids from the address book using your code instead hardcoding .
Thanks
Srinib
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hi,
I have tried the above code posted by sajuks, and it works. I was wondering how to get text into the body of the email. there dose not seem to be any oleSafeMailItem.BODY variable.
Thanks
Greg
I have tried the above code posted by sajuks, and it works. I was wondering how to get text into the body of the email. there dose not seem to be any oleSafeMailItem.BODY variable.
Thanks
Greg
The best option would be to use Outlook Redemption from http://www.dimastr.com/redemption/
Since you are not interested in Express ClickYes