Emailing from Access

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all,

I have several emailing codes that run perfectly on my PC.
Yet, when I try on some others, it doesn't execute the action.
The difference is that I have Outlook Express and some of the users have
Outlook.
Should I change some coding ?

Thanks,
B
 
Hi,
My idea is supporting all mailing methods. Here is the code to send mail
via Outlook Express:


Dim oe As OutlookExpress

Set oe = New OutlookExpress
oe.ToAddressAdd strSentTo
oe.CCAddressAdd strCC
oe.BCCAddressAdd strBCC
oe.MessageIs strMailContent
oe.SubjectIs strSubject

If Len(strAttachedFilePath) > 0 Then
oe.FileAdd strAttachedFilePath

End If

oe.Send

Set oe = Nothing

You should add to your software sending mail using CDO or Outlook-Redemption
(http://www.dimastr.com/redemption/) as well. Let user select mailing method
they like.

Regards
Tran Hong Quang
 
Hi,
You have to reference to Ms Outlook Express library.

That library normally is installed on your Ms Office folder. The path and
file name depend on where you install Ms Office and Ms Office version. I am
using Ms Office 2000, and the path is "C:\Program Files\Microsoft
Office\Office\MSOUTL9.OLB"

If you are using Office 2002, 2003, the file name seem to be MSOUTL.OLB

Go to Tools>>References...>>Click Browse... button and point to that file.

But both sending mail via Ms Outlook or Ms Outlook Express, you have problem
that you will see security dialog forcing you to wait at least 5 seconds,
then you have to click on Yes or No to send the mail. You can write small
windows script to detect that dialog, wait 5 second or more, then send Click
event to Yes button of that urgly security dialog.

If you have to send more than 1 mail in 5 seconds, you can not send via Ms
Outlook or Ms Outlook Express. I prefer sending mail via CDO, but if Ms
Exchange Server configured to authenticate sende, then Outlook-Redemption is
the best choice (ttp://www.dimastr.com/redemption/)

Bye
Tran Hong Quang
 
Back
Top