473,503 Members | 1,746 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.MailItem

Set mailObj = OutlookObject.CreateItem(Outlook.olMailItem)
With mailObj
.Recipients.Add emailAddress
.Subject = "some heading"
.Body = aMessage
.Attachments.Add 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 4124
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*****@nowhere.com> wrote in message
news:40*********************@news.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.MailItem

Set mailObj = OutlookObject.CreateItem(Outlook.olMailItem)
With mailObj
.Recipients.Add emailAddress
.Subject = "some heading"
.Body = aMessage
.Attachments.Add 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
1392
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...
8
2339
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...
2
2204
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...
7
3542
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....
17
2873
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...
3
6806
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...
1
8154
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...
7
4375
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...
1
2140
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. ...
0
7199
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,...
0
7273
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,...
1
6982
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...
0
7451
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...
0
5572
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,...
0
4667
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3161
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...
0
3150
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
374
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.