Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

ASP And MapiSession. Send Exchange email

Posted on 1999-01-10
3
Medium Priority
?
226 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 300 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…
Suggested Courses

730 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