Solved

ASP And MapiSession. Send Exchange email

Posted on 1999-01-10
3
218 Views
Last Modified: 2011-10-03
When using MapiSession.Logon the browser ask me for user login and password for Exchange Administrator to send email. How can I submit user login and password without that message box?

I use Nt 4.0, Exchange 5.5 and VBscript (ASP code). I only need to send an email to an exchange user!!

Can anyone help me?
0
Comment
Question by:javi2
3 Comments
 

Expert Comment

by:Ajoy
ID: 1455244
The answer to ur problem is the

LogonUI Property

Specifies whether or not a dialog box is provided for sign-on.

Syntax

object.LogonUI [ = value ]

The LogonUI property syntax has these parts:

object : Anobject expression that evaluates to an object in the Applies To list.
value : Aboolean expression specifying whether a logon dialog box is displayed, as described in Settings.

The settings for value are:

True (Default) :A dialog box prompts new users for their user name and password (unless a valid messaging session already exists. See the NewSession property for more information).
False  : No dialog box is displayed.
========

The False setting is useful when you want to begin a mail session without user intervention, and you already have the account name and password for the user. If insufficient or incorrect values are provided, however, an error is generate

0
 

Author Comment

by:javi2
ID: 1455245
I can't use LogonUI to pass login and password to Exchange Server 5.5, I find command to use in microsoft web.

Regards
0
 
LVL 6

Accepted Solution

by:
reddarin earned 100 total points
ID: 1455246
The answer is to drop the MAPI call and use the CDO interface. I wrote the sub below in VB but you could adapt it to use with VBscript by creating the object and assigning the properties. When you logon you supply a valid mapi profile and it works every time. In fact, I created an email based pager program that uses CDO to send the message out without prompting the user for a profile:
Public IMail As MAPI.Session
Public IMsg As Message      
Public IRec As Recipient

Set IMail = CreateObject("MAPI.Session")
IMail.Logon 'you can specify profile name and other parameters. It works everytime and you can prevent the dialog box from showing asking the user to choose a profile.

Set IMsg = IMail.Outbox.Messages.Add
Set IRec = IMsg.Recipients.Add

IMsg.Text = "Send immediately"
IRec.Name = "Darin@darin.com"
IRec.Type = CdoTo
IMsg.Send
IMail.DeliverNow

Set IMsg = Nothing
Set IRec = Nothing
Set IMail = Nothing

0

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question