473,394 Members | 1,893 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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 4110
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
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
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
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
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
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
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
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
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
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
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
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...
0
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...

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.