What makes Outlook 2007 ask for "Is the program trying to send a message on your behalf?"

I have a custom form created in Outlook that sends an email notification anytime a change occurs. Due to the form specifications, I had to add a bit of VBScript (unfortunately) to the form, which sends emails to the closing event of the form.

The form is currently published and works well. The only problem that arises is that I am the only one of the users who use the form that receives the request with the following dialog box:

enter image description here

No one using the form gets a dialog. This dialog box makes you wait until the progress bar is complete before "Let" send you an email (about 5 seconds). Is it because I'm a publisher? Or is it the client setting I am facing? How to disable this puppy?

If its relevant sources are sources:

Sub SendAttach() 'Open mail, adress, attach report Dim objOutlk 'Outlook Dim objMail 'Email item Dim strMsg Const olMailItem = 0 'Create a new message set objOutlk = createobject("Outlook.Application") set objMail = objOutlk.createitem(olMailItem) objMail.To = Item.UserProperties("Assigned To") objMail.cc = Item.UserProperties("Bcc") 'Set up Subject Line objMail.subject = "Work Order Notifications: " & Item.UserProperties("Work Order Number") & " - " & _ Item.UserProperties("Subject") & " Due " & Item.UserProperties("Due Date") 'Add the body strMsg = Item.UserProperties("Specifications") & vbcrlf strMsg = strMsg & Item.UserProperties("Constraints") objMail.body = strMsg objMail.display 'Use this to display before sending, otherwise call objMail.Send to send without reviewing objMail.Send 'Clean up set objMail = nothing set objOutlk = nothing End sub 

Security is not a concern here. If someone managed to start sending emails from my workstation, I have much more problems than replacing emails!

As a note, I could not decide if SO or SU was the best place for this question. If necessary, redirect accordingly.

+4
source share
3 answers

I ran into this problem a while ago, trying to make something a little different, but the same thing for that. The HK link provided for good reading and helps to understand what is happening, but in the end I decided not to go with any of the options discussed on the page. Instead, I left it simple and decided to trick the world out of thinking that I was sending emails and not an automatic process, I did this by replacing objMail.Send with an alternative to SendKeys to imitate me clicking a submit button, a little ugly, but working in my case .

Edit:

You can use this sendkeys statement:

 SendKeys "%{s}", 1 

This basically calls Alt + S, which launches the Outlook send button.

+3
source

Three options

 - Use a pc without the MS Outlook security patch - Use the redemption ocx (google it up to download) - Use SMTP instead of outlook 

For the second option, here is an example

 Function sendmail2 (sRecipient, sSubject, sMsg, sAttach) on error resume next dim SafeItem, oItem set SafeItem = CreateObject("Redemption.SafeMailItem") 'Create an instance of Redemption.SafeMailItem set oItem = oApp.CreateItem(0) 'Create a new message With SafeItem .Item = oItem 'set Item property .Recipients.Add sRecipient .Recipients.ResolveAll .Subject = sSubject .HTMLBody = sMsg .Send End With End Function 
+1
source

I encountered the same problem, and since my application runs on Windows 7, I was able to use the Windows Mail Client (wlmail.exe) to send email instead of MS Outlook. With Wlmail, a warning still appears in the default behavior, but it is possible to turn off the warning by going to the Settings tab> Security, and as soon as you turn it off, the program can send emails without surfacing.

0
source

Source: https://habr.com/ru/post/1410771/


All Articles