473,569 Members | 2,729 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Sending email from Access


I am composing an email with Access VB and then sending it from within
Access.

Everything works correctly (the email actually goes!) but Outlook ask
some
irritating questions that the user is required to answer. A summary of
the
relevant code is:

Dim mailObj as Outlook.MailIte m

Set mailObj = OutlookObject.C reateItem(Outlo ok.olMailItem)
With mailObj
.Recipients.Add emailAddress
.Subject = "some heading"
.Body = aMessage
.Attachments.Ad d anInvoice
.Send
End With

The emailAddress in a string containing the email address stored in the
database but when the code reaches the .Recipients.Add statement,
Outlook
issues the message:

"A program is trying to access e-mail addresses you have stored in
Outlook.
Do you want to allow this?"

Well, I am not trying to access an address stored in Outlook. When the
use
clicks 'Yes', the same question is asked once more. Again the user must
click
'Yes'

When the code reaches the .Send statement, Outlook issues the following:

"A program is trying to automatically send e-mail on your behalf. Do
you
want to allow this?"

Outlook appears to be over cautious, assuming, or at least, suspecting a
virus.

How can I prevent these irritating messages appearing. The user simply
wants to press a button on a Form and have the appropriate email sent
automatically without having the answer 'Yes' three times.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #1
1 1396
This is caused by the latest security patch from Microsoft - it's intended
to stop viruses spreading. Bizarrely there's currently no way of switching
it off - that I can find anyway - although sending automatic emails from
Access is a common function.

To get around it I uninstalled Outlook - and then reinstalled it without the
patch.

Martin

"Devonish" <no*****@nowher e.com> wrote in message
news:40******** *************@n ews.frii.net...

I am composing an email with Access VB and then sending it from within
Access.

Everything works correctly (the email actually goes!) but Outlook ask
some
irritating questions that the user is required to answer. A summary of
the
relevant code is:

Dim mailObj as Outlook.MailIte m

Set mailObj = OutlookObject.C reateItem(Outlo ok.olMailItem)
With mailObj
.Recipients.Add emailAddress
.Subject = "some heading"
.Body = aMessage
.Attachments.Ad d anInvoice
.Send
End With

The emailAddress in a string containing the email address stored in the
database but when the code reaches the .Recipients.Add statement,
Outlook
issues the message:

"A program is trying to access e-mail addresses you have stored in
Outlook.
Do you want to allow this?"

Well, I am not trying to access an address stored in Outlook. When the
use
clicks 'Yes', the same question is asked once more. Again the user must
click
'Yes'

When the code reaches the .Send statement, Outlook issues the following:

"A program is trying to automatically send e-mail on your behalf. Do
you
want to allow this?"

Outlook appears to be over cautious, assuming, or at least, suspecting a
virus.

How can I prevent these irritating messages appearing. The user simply
wants to press a button on a Form and have the appropriate email sent
automatically without having the answer 'Yes' three times.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.550 / Virus Database: 342 - Release Date: 09/12/2003
Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
4139
by: Devonish | last post by:
I am composing an email with Access VB and then sending it from within Access. Everything works correctly (the email actually goes!) but Outlook ask some irritating questions that the user is required to answer. A summary of the relevant code is: Dim mailObj as Outlook.MailItem
8
2346
by: WindAndWaves | last post by:
Hi Gurus I am trying to send a newsletter from Access. Can anyone tell me what is the simplest way to send an email from Access? I would prefer not to use outlook, because this gives me all these security warnings and besides, I would prefer not to look outlook at all, so that people with Access RT could also use my code. Is there a way...
2
2215
by: kimberly.shaffer | last post by:
Okay, I can automate sending of multiple emails with records using Groupwise and Access DB. But now what I need to do is send multiple fields associated with one field out automatically and can't figure out how to do it. For instance, my records look like this: strEmail strGroup jjohns@comcast.net catlovers...
7
3548
by: Marcin | last post by:
Hello all! A few years ago I created a form with button which let me send an email with an attachment. It was created in Access 97. Now I would like to move this application into Access 2003. But when I did it, sending email code doesn`t work. Can you be so kind and give me the code how to send email with and without attachment in vb in...
17
2877
by: Bonj | last post by:
Right guys. (I would like a solution to this in VB6 as this is what our needy app is written in, but any solutions that involve .NET would be much appreciated likewise as I could instantiate them, otherwise please forgive the crossposting.) I'm sure I've seen posts here before criticising the practice of automating outlook for the...
3
6811
by: VB Programmer | last post by:
I have an ASPX page where I send out emails through my mail server mail.MyDomain.com. When I send emails to MyName@MyDomain.com it sends PERFECTLY. When I try sending an email to any other address (non-MyDomain.com address) I get the following error: The server rejected one or more recipient addresses. The server response was: 550 You must...
1
8161
by: Eric Sheu | last post by:
Greetings, I have been searching the web like mad for a solution to my SMTP problem. I am using Windows Server 2003 and ASP.NET 2.0 w/ C# to send out e-mails from a web site I have created to the members of my organization. I think my problem is incorrectly setting the settings on my server or an authentication problem. Here is the code I...
7
4379
by: Ray Booysen | last post by:
Hi all I'm sending email via ASP.NET in HTML mode. Each email has exactly one attachment and I do have full access to the SMTP server. However, if I send the email in HTML format, the framework reports the following exception: "System.Web.HttpException: Could not access 'CDO.Message' object. --->...
1
2143
by: gemma.gill | last post by:
Hi There, I have a button on a form within access that sends a verification e- mail. My problem is that these e-mails are sending from individual user accounts rather than a genieric mailbox. Is there a way to do this? We are using MS Outlook each user has an account set up that gives them a personal mailbox and access to another...
31
12627
by: happyse27 | last post by:
Hi All, I am trying for weeks how to send email from windows pc, which from my gmail account to my hotmail account. Using net::smtp module sending email failed,Kindly assist. (for the item d it is working for normal email servers, but NOT with gmail server, I am very puzzled still!!) Codes(item c below) It keeps complaining and logs and...
0
7694
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7921
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8118
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7666
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7964
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6278
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5504
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3651
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3636
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.