how to workaround ...trying to automatically send e-mail

For quite some time I've been using the peace of code, 
which I've cut short to the essential part, from within 
Access to send e-mails. Until today everything as run 
smoothly, but since XP has been installed Outlook is 
always replying with:

Security message "...trying to automatically send e-mail 
on your behalf

the same goes for the command docmd. SendObject.

Since I use both ways to send large numbers of e-mails per 
day I'm getting desperate. 

Is there a way, programmatically, to workaround the 
security message, i.e., saying to Outlook that the 
messages are genuine and from a trustworthy part?

Thank you for the help

 Dim objApp As Outlook.Application
Dim myNamespace As Outlook.NameSpace
Dim myFoldSent As Outlook.mapiFolder
Dim Mail_msg As MailItem

Set objApp = CreateObject("Outlook.Application")
Set myNamespace = objApp.GetNamespace("MAPI")

Set myFoldSent = myNamespace.GetDefaultFolder
(olFolderSentMail)

Set Mail_msg = objApp.CreateItem(olMailItem)
Mail_msg.Subject = "Algo."
Mail_msg.Body = "O que se quiser." _
              & vbNewLine & vbNewLine _
              & "Algo mais!"
Mail_msg.To = "receivers name"
     
Mail_msg.Send

Set Mail_msg = Nothing
Set myFoldSent = Nothing
Set myNamespace = Nothing
Set objApp = Nothing

0
7/16/2004 3:33:57 PM
outlook 87535 articles. 11 followers. Follow

1 Replies
441 Views

Similar Articles

[PageSpeed] 59

Outlook 2002 SP3 adds additional properties to the list of those that are 
affected by the security features. As a result, one of your add-ins needs 
updated to the latest version -  antispam add-ins are a common cause 
although others are affected by the changes as well. Many add-ins were 
updated following the release of Outlook 2003 and should work with SP3, if 
not you'll need to contact the vendor for a newer version.

http://www.slipstick.com/outlook/ol2002sp3.htm#problems has a list of 
applications known to trigger the warning.

To learn how to program around the new properties (which is needed for the 
macros to work with OL2003 too) see http://www.outlookcode.com/d/sec.htm


-- 
Diane Poremsky [MVP - Outlook]
Author, Teach Yourself Outlook 2003 in 24 Hours
Coauthor, OneNote 2003 for Windows (Visual QuickStart Guide)
Author, Google and Other Search Engines (Visual QuickStart Guide)

Outlook Tips: http://www.outlook-tips.net/
Outlook & Exchange Solutions Center: http://www.slipstick.com
Join OneNote Tips mailing list: http://www.onenote-tips.net/

Vote for your favorite Outlook and Exchange utilities in the
Slipstick Ratings Raffle at http://www.slipstick.com/contest/

"Procuro" <procuro_cpt@yahoo.it> wrote in message 
news:2ec2901c46b4a$4f401c10$a301280a@phx.gbl...
> For quite some time I've been using the peace of code,
> which I've cut short to the essential part, from within
> Access to send e-mails. Until today everything as run
> smoothly, but since XP has been installed Outlook is
> always replying with:
>
> Security message "...trying to automatically send e-mail
> on your behalf
>
> the same goes for the command docmd. SendObject.
>
> Since I use both ways to send large numbers of e-mails per
> day I'm getting desperate.
>
> Is there a way, programmatically, to workaround the
> security message, i.e., saying to Outlook that the
> messages are genuine and from a trustworthy part?
>
> Thank you for the help
>
> Dim objApp As Outlook.Application
> Dim myNamespace As Outlook.NameSpace
> Dim myFoldSent As Outlook.mapiFolder
> Dim Mail_msg As MailItem
>
> Set objApp = CreateObject("Outlook.Application")
> Set myNamespace = objApp.GetNamespace("MAPI")
>
> Set myFoldSent = myNamespace.GetDefaultFolder
> (olFolderSentMail)
>
> Set Mail_msg = objApp.CreateItem(olMailItem)
> Mail_msg.Subject = "Algo."
> Mail_msg.Body = "O que se quiser." _
>              & vbNewLine & vbNewLine _
>              & "Algo mais!"
> Mail_msg.To = "receivers name"
>
> Mail_msg.Send
>
> Set Mail_msg = Nothing
> Set myFoldSent = Nothing
> Set myNamespace = Nothing
> Set objApp = Nothing
> 


0
dianenws (1904)
7/16/2004 3:41:34 PM
Reply:

Similar Artilces:

Inbox send/receive syncronizing
New user and I'm unsure as to what I need to do to get send/receive syncronizing to happen (?or does it need to happen) faster. At this point it will not even load old or new emails. I'm nto sure what you are referrign to here. Do you mean to get the Send/Recive process happening? Have you pressed the Send / Receive button on the main Outlook toolbar? You can set a scheduled automatic Send / Receive via Ctrl + ALT + S. -- Bill R MVP "kdogg" <kdogg@discussions.microsoft.com> wrote in message news:A019B8D9-47A2-40F5-891A-A80E4378C27B@microsoft.com... > New u...

Can E-mail recipient policy be linked to the OU membership?
Running Exchange 2003 (mixed mode) and Windows 2003 server (Windows 2000 mixed mode): I'd like to create a e-mail recipient policy that is linked to the different OU's that are created on the system. Is it possible to link the policy to a specific OU or do I need to create groups on the AD to control which recipients a policy applies to? Martin Moustgaard Yes, you can create a recipient policy that looks to just a specific OU. It is done through LDAP queries. Here are some references to articles and whitepapers that discuss how to work with recipient policies. 249299.KB.EN-US HO...

Outlook Send/Receive mail SLOW
When I receive/send email, it loads sends/receives extremely slow. The percentage indicator when receiving/sending starts at 3-5% and stays that way for awhile. After several minutes, the mail eventually comes through. Any reason for this? ...

Send to certain person using specific email account
I send an email to a certain receipient but don't want to use the default email account. Is it possible that when I send to them (plain text) , that it will choose the other account I want to use to send it? Please advise how I set this up. Thanks. I do not believe that this can be achieved automatically through standard use of Outlook as you need to manually specify the name of the account to send from if different than the default. However, it would be possible using the Outlook object model. An Addin would need to be developed that monitored each mail item prior to sending. If the d...

Setting up a new e-mail account
I'm trying to set up my yahoo account so that I receive my e-mail messages in my Outlook Inbox. I went to Accounts, and servers, and put in mail.yahoo.com for incoming mail (POP3) and smtp.yahoo.com for outgoing mail (smtp). When I click on the send/receive button I get an error message. Dave <anonymous@discussions.microsoft.com> wrote: > I'm trying to set up my yahoo account so that I receive > my e-mail messages in my Outlook Inbox. I went to > Accounts, and servers, and put in mail.yahoo.com for > incoming mail (POP3) and smtp.yahoo.com for outgoing mail &...

Receiving POP3 mail into Outlook without Send/Receive
I want the POP3 mail to be received into Outlook (If open) when the mail arrives in POP3 account. Is that possible? Set an Automatic Polling Interval. --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. All unsolicited mail sent to my personal account will be deleted without reading. After furious head scratching, delanda asked: | I want the POP3 mail to be received into Outlook (If open) when the | mail arrives in POP3 account. Is that possible? ...

Replying to an Outlook e-mail
When replying to e-mail in Outlook, everything works fine. But when I try to reply to an e-mail that has an embedded picture in it, Outlook won't send it. I get the message that the e-mail was sent, but it stays in the outbox and never sends. Any suggestions? -- Jack "Jack Johnson" <hotshotz@comcast.net> wrote in message news:D6C50AC7-EB37-4B54-9611-F9F42F1F1BA0@microsoft.com... > When replying to e-mail in Outlook, everything works fine. But when I try to > reply to an e-mail that has an embedded picture in it, Outlook won't send > it. &...

Sending Email #6
When sending e-mail I heep getting it bounced back with the following message; Your message did not reach some or all of the intended recipients. Subject: Sent: 1/12/04 4:34 PM The following recipient(s) could not be reached: 'name' on 1/12/04 4:34 PM 553 sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1) Why does this keep happening? Receiving e-mail is not a problem. Generally, this error message means that the email address to which it refers is not accurate. Go to your address book and carefully check the spelling and ...

I want to add a mail account without setting a SMTP server. Is it possible?
I want to add a second mail account that is outside my company. Since the company firewall does not allow us to connect to SMTP-servers I want to add this account without setting the SMTP propertiy. I cannot specify the company server as it is an Exchange server and the outside one an IMAP one. Currently I have specified the outside SMTP server since outook does not allow me to add an account wihtout setting this. I keep getting annoying error messages as my computer can't connect to the outside SMTP. Any one know a way around this? cheers, mortb The company server has SMTP enabled, u...

Saving e-mail & attachments when upgrading
I'm upgrading from NT4 to XP Home and the only data I need to keep are the emails & attachments. I have to format the hard drive to eliminate the partitions. This machine is on a network and I can save to the other machune. Look here for all the information you need on backup and restoration of Outlook data: http://www.slipstick.com/config/backup.htm -- Jocelyn Fiorello MVP - Outlook *** Replies sent to my e-mail address will probably not be answered -- please reply only to the newsgroup to preserve the message thread. *** "Mike" <mike@hosemart.com.au> wrote ...

how to install Microsoft Mail to Outlook 2003
pls help I found 'this' (http://www.outlook-tips.net/howto/msmail.htm) on www.outlook-tips.net I don't know if it works... ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~View and post usenet messages directly from http://www.ExcelForum.com/ It does. -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 24 Hours Coauthor, OneNote 2003 for Windows (Visual QuickStart Guide) Outlook Tips: http://www.outlook-tips.net/ Search for answers: http://groups.google.com Most recent posts to the Outlook newsgroups: ...

Duplicate E-Mail #4
Every time I get e-mail from certain users I get their e-mail twice. I have not been able to figure out why this is happening. Is it their fault or my fault and if it is my fault, how do I fix it? Thanks, Al Alfred Kaufmann <al_kaufmann@hotmail.com> wrote: > Every time I get e-mail from certain users I get their e-mail twice. I > have not been able to figure out why this is happening. Is it their > fault or my fault and if it is my fault, how do I fix it? See if this helps: http://www.howto-outlook.com/faq/duplicates.htm -- Brian Tillman [MVP-Outlook] ...

Exchange 2003, Two Sites, Two Smarthosts, One Domain, No Internal mail!!
Hi, I hope there is someone out there who can point me in the right direction. We have two sites, Brisbane and Sydney, connected by a frame realy connection. Sydney is currently running exchange 2003 (upgraded by migration from exchange 5.5 about a month ago). Brisbane is currently running their mail through sendmail and sendmail only. We have just installed exchange 2003 on server 2003 box in Brisbane and are trying to get the two sites working in two routing groups. The topology will be the same in both Brisbane and Sydney, in that each city will have an external mail server running sendma...

Odd e-mail duplication problem
All e-mails promoted or Tracked in CRM Outlook client are being copied to one particular Account that is unrelated. The e-mails are copied correctly to the history of the desired accounts and Contacts but also copy to one particular Accountl as well. As anyone seen anything like this and have any ideas what could be wrong? -- Darryl - dh@mtccrm.com -www.mtccrm.com - Only Microsoft CRM ...

Windows mail asking to verify username and password
I was in Windows Mail when suddenly a box popped up asking for my username and password from Windows Mail.. Although I attempted correctly several times it still will not work. I contacted my kerrlake server and we tried several things including deleting the account and resetting it back up but it still will not open. I can receive my emails on my blackberry and can get on the internet. Also, a protocal error message pops up. Please help! -- Diamond & Associates When you get that repeated prompt for username and password, click = Cancel, which should then produce an erro...

Start macro creating a mail with contact data and autotext
Hallo, I am working with an user form. The developing of that form started with Outlook XP with a lot of code inside for different buttons. I changed to Outlook 2007 and unfortunately the code of the form was not longer displayed. What I learned about this is that MS does not support to much code in the form (or maybe a bug). They also do not support any longer. I was sending this form to MS support but they told it is do much code inside and they do not know, why the code is not displayed. In Outlook 2003 the code is displayed as in Outlook XP. Because I do not know real...

Automatically open Detail Entry Window
In SOP Transcation Entry, I'd like the Sales Customer Detail Entry window to open automatically after the customer ID is selected. Is this possible? How would I go about doing this with Modifier or VBA? Extender would come in very handy. You don't need to write a single code. Record a macro using GP macro and embed it on the SOP Entry window using Extender. "Elaine" wrote: > In SOP Transcation Entry, I'd like the Sales Customer Detail Entry window to > open automatically after the customer ID is selected. Is this possible? How > would I go about doi...

Sending E-mails at a defined time with MS Exchange Server
We're using MS Exchange Server at the office. We have around 150 e-mail accounts set up. Some of our users are sending enourmous attachement (~100 Mega) and sometimes to 50 different addresses. During the day this is chewing up all our bandwith. What we would like to know if it's possible in Exchange to define that sort of rule : - Send e-mails with an attachment bigger than 8 M�g only after 20h00 ? (so they don't chew up the bandwith during the day as this has an impact on our FTP transmission module and our client server applications) Or maybe an add-on ? Any suggestions...

send on behalf #6
Hi, We have a helpdesk mailbox and I would like to give the "send on behalf" permission to a distribution group but "active directory Users and computers" won't let me do this. I can only see users. No groups. Exchange 2003 sp2, Outlook 2003, Native forest. I don't wanna use "send as" cause we wanna see sender name. Could it be a GC problem? Am I missing something? Thanks On 19 May 2006 06:43:07 -0700, dany_langlois@yahoo.com wrote: >Hi, > >We have a helpdesk mailbox and I would like to give the "send on >behalf" permiss...

Parameters to open SO Manager with your credentials automatically?
Does anyone know of either shortcut target line parameters that would cause you to automatically log in with a specific user/password combo; or even a command prompt parameter? Thanks! ...

Setting up Word to automatically open in Standard mode, zoom=page margins
I've tried to find ways to handle this through the normal.dot file and can't find it... Word wants to open in layout mode and 200% zoom, forcing me to manually select mode and zoom. Any way to get Word to do what I want instead of what it wants? Thanks for your time. ===== Edward Lipsett Fukuoka, Japan Hi Edward: Word will open each document in the view and zoom it as last saved in. The onyl way to have a particular view happen every time is to create an AutoOpen() macro that specifies the view you want. Turn on your Macro Recorder and record yourself setting the view and zo...

proper casing mail merge
Hi All, I have a mail merge document where all the information is in ALL CAPS. Is there a quick way to turn into Proper casing? Thanks, rodchar Select the whole text, Format, Change Case, you will now have various options to choose from. Also, note that Shft+F3 toggles between no caps, Initial caps, and all caps. -- Hope this helps DeanH "rodchar" wrote: > Hi All, > > I have a mail merge document where all the information is in ALL CAPS. Is > there a quick way to turn into Proper casing? > > Thanks, > rodchar thanks, that help...

Exchange 2003 Web Mail.. Disappearing content.
I have a strange situation brewing that I haven't been able to figure out yet. About once a day, my Exchange 2003 server forgets how to display email content. That is, when a user tries to open ANY email, it opens, but there is NO content. The only solutions I have come up with are temporary: 1) Reboot the server (which can take in excess of 15 minutes), or 2) Restart the MS Exchange Store service. Sometimes I have to restart the IIS web site where webmail is configured and running Specs on the server are 2ghz P3 with 1gig RAM w/ Windows 2003 Enterprise Serve Exchange 200 IIS6. I wo...

A Domain Is Rejecting My Mail
I'm starting to pull my hair out on this one and would appreciate any assisstance you could provide. I've got two Exchange 2003 servers. I can send to everyone on the planet with no problems - except this one particular domain. When I send to them, I get the following returned: The following recipient(s) could not be reached: Nobody@special.com on 9/28/2004 8:30am There was a SMTP communication problem with theh recipient's email server. Please contact your system administrator. <mail3.hearthnhome.com #5.5.0 smtp;501 Failure Bad FROM: RCPT TO (553.5.5.4 <>...Domain name...

unable to send outbound mail using outlook
I've enabled the smtp virtual server on our new exchange server and have our domain's mx record pointed to it. I've redirected our clients to point from our ISP's mail server to ours, but outbound mail is not working. when i tried to telnet to our server and do a "mail from: " of a local account, it's saying invalid address. Is there a separate setting to enable using this SMTP virtual server for outgoing mails? -Jerry Sorry... my mistake. I simply enabled message relaying and it works now. "jerrydy" wrote: > I've enabled the smtp virtua...