Outlook Redemption, tool of choice??

B

Bill

Is Outlook Redemption the tool of choice
these days to suppress un-wanted warning
messages from Outlook when wanting to
"quietly" send out e-mail from VBA code?

Bill
 
R

Rick Brandt

Is Outlook Redemption the tool of choice these days to suppress
un-wanted warning messages from Outlook when wanting to "quietly" send
out e-mail from VBA code?

Bill

It's *an* option, but who can tell if it's the most popular? I was never
interested in it because I didn't want a solution that meant installing
something on every user's computer. I use the CDOSys messaging library
when I want to send an Email that the user does not have to interact
with.

If it's an Email the user does need to interact with prior to sending
then I use Outlook automation and inform the user that they have to
properly deal with the prompts.
 
B

Bill

Rick,
I too shy away from the requirement that special
code be installed on every user's machine. I got
112,000 hits on a Google of COMSYS. Can you
point me to one of the sites that would serve as
the first-time exposure?

The user does not need to interact with the send,
so the use of the Outlook object model with its
pesky warning messages is what I'm trying to get
around.

Bill
 
B

Bill

Stuart,
Running your test code (no attachments):

Sub test1()
'Send a single message
With New clsCDO
.Server = "smtp.psln.com" 'Specify correct
server name or IP

.Sender = "(e-mail address removed)" 'Sender's email
address
.SenderName = "Bill Stanton" 'Sender's name

.Receiver = "(e-mail address removed)" 'Receiver's email address
.ReceiverName = "GraeagleBill" 'Receiver's name

.Subject = "A test subject" 'Message Subject
line
.Text = "This is a test message body" 'Message text

'.Files.Add "c:\temp\test1.zip" 'Add a couple of
attachments
'.Files.Add "c:\temp\test2.zip"

.SendMail 'Send the message
End With
End Sub

I got a runtime error:

Run-time error '-2147220975(80040211)':

The message cound not be sent to the SMTP server.
The transport error was 0x80040217. The server
response was not available.

With my ISP's SMTP properties my SMTP server requires
authentication. I see where you've enumerated "AuthTypes"
in clsCDO, but I couldn't figure out if that was playing a role
in causing the run-time error.
 
S

Stuart McCall

Bill said:
Stuart,
Running your test code (no attachments):

Sub test1()
'Send a single message
With New clsCDO
.Server = "smtp.psln.com" 'Specify correct
server name or IP

.Sender = "(e-mail address removed)" 'Sender's email
address
.SenderName = "Bill Stanton" 'Sender's name

.Receiver = "(e-mail address removed)" 'Receiver's email address
.ReceiverName = "GraeagleBill" 'Receiver's name

.Subject = "A test subject" 'Message Subject
line
.Text = "This is a test message body" 'Message text

'.Files.Add "c:\temp\test1.zip" 'Add a couple of
attachments
'.Files.Add "c:\temp\test2.zip"

.SendMail 'Send the message
End With
End Sub

I got a runtime error:

Run-time error '-2147220975(80040211)':

The message cound not be sent to the SMTP server.
The transport error was 0x80040217. The server
response was not available.

With my ISP's SMTP properties my SMTP server requires
authentication. I see where you've enumerated "AuthTypes"
in clsCDO, but I couldn't figure out if that was playing a role
in causing the run-time error.
<snip>

Hi Bill

The authentication type is most likely the cause of the problem. Inside the
With...End With block, put this code:

..Authenticate = cdoNTLM 'or cdoBasic for plain text authentication
..Password = "My Password"

(put your actual password here of course)

Also, unless you have a c:\temp\test1.zip and a c:\temp\test2.zip, you need
to remove the attachment lines.

Hope that gets you going.
 
S

Stuart McCall

Stuart McCall said:
<snip>

Hi Bill

The authentication type is most likely the cause of the problem. Inside
the With...End With block, put this code:

.Authenticate = cdoNTLM 'or cdoBasic for plain text authentication
.Password = "My Password"

(put your actual password here of course)

Also, unless you have a c:\temp\test1.zip and a c:\temp\test2.zip, you
need to remove the attachment lines.

Hope that gets you going.

I forgot to mention UserID. Add this line also:

..UserID = "My User ID"

(substituting your actual ID)
 
P

Paul Shapiro

I haven't been to look at it for a while, but www.slipstick.com used to be
the best general Outlook resource I knew. Maybe see if they have anything to
say? I've used the free ContextMagic application (used to be called Outlook
ClickYes) for this purpose and it worked fine. You can enable/disable in
your code, so the Outlook "protection" stays enabled except when your code
is sending mail.

If you have Outlook 2007 none of this is necessary any more. As long as the
Windows Security Center sees an up-to-date anti-malware program, you can use
the Outlook object model without the warnings.
 
M

MikeB

As a workaround to Redemption, you can write a little API based code to
intercept the error message dialog and close it. You will get a brief
flicker of the message, but it only occurs once per session.
 
B

Bill

Stuart McCall said:
<snip>

Hi Bill

The authentication type is most likely the cause of the problem. Inside
the With...End With block, put this code:

.Authenticate = cdoNTLM 'or cdoBasic for plain text authentication
.Password = "My Password"

(put your actual password here of course)

Also, unless you have a c:\temp\test1.zip and a c:\temp\test2.zip, you
need to remove the attachment lines.

Hope that gets you going.

Stuart, the addition of .Authenticate = cdoNTLM (in debug)
produces Run-time error 438, "Object doesn't support this
property or method".

I reordered the statements and I get the same error on
the .password and .userid statements.

Bill


Bill
 
S

Stuart McCall

Stuart, the addition of .Authenticate = cdoNTLM (in debug)
produces Run-time error 438, "Object doesn't support this
property or method".

I reordered the statements and I get the same error on
the .password and .userid statements.

Bill

Hi Bill

I can't reproduce the problem here. Better post your code (remember to munge
the sensitive properties, like UserID & Password. Never post real values on
here - too risky).

BTW the property settings can be done in any order, just ensure they're all
done before invoking the SendMail method.
 
B

Bill

My version of your test1 code.

Sub test1()
'Send a single message
With New clsCDO
.Server = "smtp.psln.com" 'Specify correct
server name or IP

.Sender = "(e-mail address removed)" 'Sender's email
address
.SenderName = "Bill Stanton" 'Sender's name

.Receiver = "(e-mail address removed)" 'Receiver's email address
.ReceiverName = "GraeagleBill" 'Receiver's name

.Subject = "A test subject" 'Message Subject
line
.Text = "This is a test message body" 'Message text

'.Files.Add "c:\temp\test1.zip" 'Add a couple of
attachments
'.Files.Add "c:\temp\test2.zip"

.Authenticate = cdoNTLM 'or cdoBasic for plain text authentication
.UserId = "billstanton"
.Password = "mypassword"

.SendMail 'Send the message
End With
End Sub
 
B

Bill

Paul,
slipstick indeed has some references that would
allow the setting of a Registry key that would
suppress the warnings. However, the MS article
is quite convoluted to the point where it's
difficult to tell what key change applies to the
suppression of Outlook warnings.

If you have further knowledge to which key is
applicable, I'd appreciate you sharing in order
to avoid wasted time.

Bill
 
P

Paul Shapiro

I'm not familiar with the registry edits to suppress the Outlook warnings.
Seems to me I might have done that many years ago, but once I found ClickYes
(now ContextMagic), I preferred that approach to disabling all of the
Outlook object model security. There was also an option involving an
Exchange public folder if I remember correctly, assuming Outlook was sending
mail through an Exchange server, but I think that might have been back in
Outlook 97 or 2000 days. I never used it and don't know if it's still
possible. I think there was a Microsoft kb article at the time, so searching
might still find it.
 
S

Stuart McCall

Bill said:
Stuart, the addition of .Authenticate = cdoNTLM (in debug)
produces Run-time error 438, "Object doesn't support this
property or method".

I reordered the statements and I get the same error on
the .password and .userid statements.

Bill


Bill

Hi Bill

Sorry for the delay. I posted this message earlier today but for some reason
it didn't make it, so here it is again:

I can't reproduce the problem here. Better post your code (remember to munge
the sensitive properties, like UserID & Password. Never post real values on
here - too risky).

BTW the property settings can be done in any order, just ensure they're all
done before invoking the SendMail method.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top