Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Logon failed: MapiLogonEx Failed due to MAPI error 273: MAPI Logon failed.

363 views
Skip to first unread message

Gordon Radley

unread,
Jun 12, 2001, 1:04:49 PM6/12/01
to
I am trying to send an e-mail using the using the DTS Object Model from
within an ActiveX Script. When I try to execute the package step I get the
following error:

"Logon failed: MapiLogonEx Failed due to MAPI error 273: MAPI Logon failed."

Can anyone shed some light on what may be causing this error. Any help
would be appreciated. Here is the sample code:

' E-mail Message goes here...
Set oMailStep = oPackage.Steps.New
Set oMailTask = oPackage.Tasks.New("DTSSendMailTask")

oMailTask.Name = "DTSSendMail_Added_At_Runtime"

' Get to the SendMail Level of Object..
Set oMail = oMailTask.CustomTask

' Set the E-mail properties...
oMail.MessageText = "Errors found during xxx processing. Please review
attached file. "
oMail.Profile = "Microsoft Outlook"
oMail.ToLine = "x...@yyy.com"
oMail.Subject = "xxx Processing Errors"
oMail.FileAttachments = DTSGlobalVariables("strErrorPath").Value &
"xxx_err.txt"


' Complete the Details for the step to be added...
oMailStep.TaskName = oMail.Name
oMailStep.Name = "MailSend"


' Add the Step and Task to the package then execute...
oPackage.Steps.Add oMailStep
oPackage.Tasks.Add oMailTask

oPackage.Steps("MailSend").Execute (This is where the error is raised)


Kevin Lott

unread,
Jun 19, 2001, 7:19:00 PM6/19/01
to
This is a mail profile issue.

Make sure your SQL Server service is running under an NT account that has
access to mail.

Logon to the SQL Server with that NT account, open outlook. If outlook is
not installed, install it. Setup a default mail profile. Make a test DTS
package with a send mail task. Execute that package from the console at the
SQL Server box.

Remember, if you execute a package interactively it will use the connections
and mail profiles located on the machine you are using.

Kevin Lott

"Gordon Radley" <gra...@yacobian.com> wrote in message
news:uMTL9G28AHA.1588@tkmsftngp03...

0 new messages