473,407 Members | 2,306 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,407 software developers and data experts.

Send email - capture ProfileName from MAPI

Help - trying to send a simple text email with with as little user
intervention.

I am trying to create a button in my Access application that will
automatically send a simple text email. It works except that I have
two warning nuisances:
1) Program is trying to access email Addresses you have stored in
Outlook. Allow access for ...
2) A program is trying to automatically send email on your behalf ...
Heck, I am only trying to a send a simple text message to an email
stored in a field, not access addresses in Outlook. OK, we don't want
hackers making havic ... I understand.

My concern is in specifying a generic ProfileName. Not everybody is
going to have the same logon ProfileName. If you incorrectly specify
the Logon ProfileName, you will be prompted by Outlook to select a
Profile. Could I let a user specify a profile name in the windows
Outlook dialog box the first time, capture that selection, store it in
a field and use that captured profile name in future logon?

First time ...
Dim ObjSession As MAPI.Session
Set ObjSession = CreateObject("Mapi.Session")
ObjSession.Logon ProfileName:= strProfile

User is prompted for Profile (srtProfile = "") ... user selects
"Outlook". The string "Outlook" is stored in a field. profileName =
"Outlook"

Second time and future times ...
strProfile = Me.profileName
Dim ObjSession As MAPI.Session
Set ObjSession = CreateObject("Mapi.Session")
ObjSession.Logon ProfileName:= strProfile

Thanks in advance for any advice

Jay McGrath
Nov 12 '05 #1
1 5307
tav
try setting outlook express as your default email program in the tools
section of the internet explorer. outlook express does not require a
profile. also, go to tools, options, security tab in outlook express
and remove the check re: warning if other applications..."

ja*********@hotmail.com (Jay McGrath) wrote in message news:<e5**************************@posting.google. com>...
Help - trying to send a simple text email with with as little user
intervention.

I am trying to create a button in my Access application that will
automatically send a simple text email. It works except that I have
two warning nuisances:
1) Program is trying to access email Addresses you have stored in
Outlook. Allow access for ...
2) A program is trying to automatically send email on your behalf ...
Heck, I am only trying to a send a simple text message to an email
stored in a field, not access addresses in Outlook. OK, we don't want
hackers making havic ... I understand.

My concern is in specifying a generic ProfileName. Not everybody is
going to have the same logon ProfileName. If you incorrectly specify
the Logon ProfileName, you will be prompted by Outlook to select a
Profile. Could I let a user specify a profile name in the windows
Outlook dialog box the first time, capture that selection, store it in
a field and use that captured profile name in future logon?

First time ...
Dim ObjSession As MAPI.Session
Set ObjSession = CreateObject("Mapi.Session")
ObjSession.Logon ProfileName:= strProfile

User is prompted for Profile (srtProfile = "") ... user selects
"Outlook". The string "Outlook" is stored in a field. profileName =
"Outlook"

Second time and future times ...
strProfile = Me.profileName
Dim ObjSession As MAPI.Session
Set ObjSession = CreateObject("Mapi.Session")
ObjSession.Logon ProfileName:= strProfile

Thanks in advance for any advice

Jay McGrath

Nov 12 '05 #2

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

Similar topics

40
by: ian | last post by:
Hi, I'm a newbie (oh no I can here you say.... another one...) How can I get Python to send emails using the default windows email client (eg outlook express)? I thought I could just do the...
0
by: David Burson | last post by:
Hi, I have a VB.NET windows app that needs to automatically send a simple text email when my users run a new version of the app for the first time. I thought this would be simple, but after...
4
by: jas | last post by:
I have a basic client/server socket situation setup....where the server accepts a connection and then waits for commands. On the client side, I create a socket, connect to the server...then I...
2
by: madfisher | last post by:
Hi, I am trying to send an email with MAP via C# and ASP.NET. This is what I'm doing. MapiSession1 = new MSMAPI.MAPISessionClass(); MapiSession1.UserName = "OutlookProfileName";...
15
by: cj | last post by:
How can I get a button in VB to send the contents of a text box via email in a manner similar to the "Send To\Mail Recipient" functionality that you can select via right clicking a file in Windows...
3
by: Siv | last post by:
Hi, A little while ago I wrote a small program that allowed the user to view products from a database. The database holds the details of the products which can be viewed via a form and...
3
by: sentiboy | last post by:
I am using the following code for sending email through mapi in VS 2005 environment: Public objSession As New MSMAPI.MAPISession Public objMessage As New MSMAPI.MAPIMessages ...
1
by: Danny | last post by:
Hi Am trying to send emails via simple mapi. The application will be running on a machine which has outlook 2003 installed. My test app works but the file email is placed in the outbox within...
1
by: prasadmore | last post by:
I am developing a web service using CDO 1.21 to create an appointement in Exchange Server 2003. The Logon method is executing successfully and able to access Inbox folder. When I try to create an...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
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
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...

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.