sending mail when Otlook in 'always prompt for user name and passw

Status
Not open for further replies.
Q

Q2hyaXMgTWlsbGVy

I use the CDO objects to perform outlook integration from an external

application, with Redemption to perform safe mail sending. This works fine

for most modes, however:

If an exchange mail account (and I persume any POP or IMAP accounts are the

same) has the "Always prompt for user name and password" option in its

security settings enabled, I can access the inbox, but not send mail. The

mail I send goes into the Drafts folder and stays there.

Usually, when manually using Outlook, a send and recieve will prompt for the

username and password, however under automation, that prompt seems to be

supressed.

When I issue the Logon command to the namespace, no paramters seem available

to offer authentication for the automation session.

Is there any workaround for this?

I can use RDO objects from redemption if neccissary, or use CDO objects

Many Thanks
 
K

Ken Slovak - [MVP - Outlook]

Sending using code is a 2 step process. First you send the item, then you

start the email transport.

Since Outlook 2002 the old CDO.DeliverNow() method no longer works (nor does

Redemption.MAPIUtils.DeliverNow()) because there is no MAPI spooler. Usually

what people do is to use the Outlook SyncObjects collection, getting

SyncObjects[1] and calling Start() on it. That's the equivalent of manually

using Send/Receive on the default send/receive group.

Even with RDO you still need to engage the transport that way. There's code

showing this on the Redemption Web site, in the FAQ section.

"Chris Miller" <ChrisMiller> wrote in message

news:4F505B6C-1E40-4EA1-AEC5-D012D7240107@microsoft.com...
> I use the CDO objects to perform outlook integration from an external
> application, with Redemption to perform safe mail sending. This works fine
> for most modes, however:

> If an exchange mail account (and I persume any POP or IMAP accounts are
> the
> same) has the "Always prompt for user name and password" option in its
> security settings enabled, I can access the inbox, but not send mail. The
> mail I send goes into the Drafts folder and stays there.

> Usually, when manually using Outlook, a send and recieve will prompt for
> the
> username and password, however under automation, that prompt seems to be
> supressed.

> When I issue the Logon command to the namespace, no paramters seem
> available
> to offer authentication for the automation session.

> Is there any workaround for this?

> I can use RDO objects from redemption if neccissary, or use CDO objects

> Many Thanks
 
Q

Q2hyaXMgTWlsbGVy

Re: sending mail when Otlook in 'always prompt for user name and p

Thanks Ken,

That does work as I need it, thanks very much!
wrote:


> Sending using code is a 2 step process. First you send the item, then you
> start the email transport.

> Since Outlook 2002 the old CDO.DeliverNow() method no longer works (nor does
> Redemption.MAPIUtils.DeliverNow()) because there is no MAPI spooler. Usually
> what people do is to use the Outlook SyncObjects collection, getting
> SyncObjects[1] and calling Start() on it. That's the equivalent of manually
> using Send/Receive on the default send/receive group.

> Even with RDO you still need to engage the transport that way. There's code
> showing this on the Redemption Web site, in the FAQ section.

> >

>

> "Chris Miller" <ChrisMiller> wrote in message
> news:4F505B6C-1E40-4EA1-AEC5-D012D7240107@microsoft.com...
> >I use the CDO objects to perform outlook integration from an external
> > application, with Redemption to perform safe mail sending. This works fine
> > for most modes, however:
> > If an exchange mail account (and I persume any POP or IMAP accounts are
> > the
> > same) has the "Always prompt for user name and password" option in its
> > security settings enabled, I can access the inbox, but not send mail. The
> > mail I send goes into the Drafts folder and stays there.
> > Usually, when manually using Outlook, a send and recieve will prompt for
> > the
> > username and password, however under automation, that prompt seems to be
> > supressed.
> > When I issue the Logon command to the namespace, no paramters seem
> > available
> > to offer authentication for the automation session.
> > Is there any workaround for this?
> > I can use RDO objects from redemption if neccissary, or use CDO objects
> > Many Thanks


>
 
Q

Q2hyaXMgTWlsbGVy

Re: sending mail when Otlook in 'always prompt for user name and p

Further to this fix, I have noticed in outlook 2003 that I get a top most,

blocking authentication window, but in 2007 The window is created but not

pushed to the front, and it does not block.

Does anybody know a way to make the SyncObjects.Start() method block on

outlook 2007. (perhaps I can hand the application a windows handle or

something?)

Any further help is greatly appreciated!

Many thanks

"Chris Miller" wrote:


> Thanks Ken,

> That does work as I need it, thanks very much!

> " - " wrote:
>
> > Sending using code is a 2 step process. First you send the item, then you
> > start the email transport.
> > Since Outlook 2002 the old CDO.DeliverNow() method no longer works (nor does
> > Redemption.MAPIUtils.DeliverNow()) because there is no MAPI spooler. Usually
> > what people do is to use the Outlook SyncObjects collection, getting
> > SyncObjects[1] and calling Start() on it. That's the equivalent of manually
> > using Send/Receive on the default send/receive group.
> > Even with RDO you still need to engage the transport that way. There's code
> > showing this on the Redemption Web site, in the FAQ section.
> > > >

> >

> > "Chris Miller" <ChrisMiller> wrote in message
> > news:4F505B6C-1E40-4EA1-AEC5-D012D7240107@microsoft.com...
> > >I use the CDO objects to perform outlook integration from an external
> > > application, with Redemption to perform safe mail sending. This works fine
> > > for most modes, however:
> > > > If an exchange mail account (and I persume any POP or IMAP accounts are
> > > the
> > > same) has the "Always prompt for user name and password" option in its
> > > security settings enabled, I can access the inbox, but not send mail. The
> > > mail I send goes into the Drafts folder and stays there.
> > > > Usually, when manually using Outlook, a send and recieve will prompt for
> > > the
> > > username and password, however under automation, that prompt seems to be
> > > supressed.
> > > > When I issue the Logon command to the namespace, no paramters seem
> > > available
> > > to offer authentication for the automation session.
> > > > Is there any workaround for this?
> > > > I can use RDO objects from redemption if neccissary, or use CDO objects
> > > > Many Thanks

> >
 
K

Ken Slovak - [MVP - Outlook]

Re: sending mail when Otlook in 'always prompt for user name and p

SyncObject.Start() starts an asynchronous process, so there's no real

blocking method. You can however subscribe to the SyncObject.SyncEnd() and

SyncObject.OnError() events to let you know when the process stops or fires

an exception.

So what you can do is to loop and check a global Boolean flag that's cleared

when you start the synch and is set (or vice versa) when the SyncEnd() event

fires. I'd also use some sort of fail safe like a check of the system time

in the loop with a maximum allowed loop interval so you avoid the

possibility of an endless loop for whatever reason.

However, since the synch can take varying amounts of time depending on

number and size of messages sent and received, bandwidth to the mail server,

etc. there may be a long blocking period when the synch is started before it

completes.

"Chris Miller" <ChrisMiller> wrote in message

news:EC87764B-79DA-492E-B8AF-E5D99A36EDFC@microsoft.com...
> Further to this fix, I have noticed in outlook 2003 that I get a top most,
> blocking authentication window, but in 2007 The window is created but not
> pushed to the front, and it does not block.

> Does anybody know a way to make the SyncObjects.Start() method block on
> outlook 2007. (perhaps I can hand the application a windows handle or
> something?)

> Any further help is greatly appreciated!

> Many thanks
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
H Custom autoforwarding, sending mail through outlook office 365 Using Outlook 1
C How to avoid sending mail to the wrong contact person New Slipstick.com Articles 1
C Change From address while sending a new mail Outlook VBA and Custom Forms 5
T What code to use to move the custom field values to message body when sending e-mail ? Outlook VBA and Custom Forms 8
A Shortcut for sending complete mail Using Outlook 1
R How to Block from sending mail to public domain. Using Outlook 8
S Checking attachment is passward protected or not before sending the mail Using Outlook 1
A Application_ItemSend not accessed when sending email outside outlook (i.e. word or send to mail from Using Outlook 7
R POP3 Mail repeating while sending to group of recipient Using Outlook 1
M IMAP & Exchange accounts sending mail Using Outlook 1
J Sending Mail From A Different Address Using Outlook 2011 for Mac Using Outlook 0
N Sending encrypted signed mail using outlook 2010 Using Outlook 1
A How to send Personalized attachment while sending mass mail Using Outlook 1
E Outlook invitation request mail sending twice problem Using Outlook 1
W Sending video attachment with e-mail Using Outlook 1
D Sending mass e-mail (picture only) Using Outlook 1
B __Task 'Email removed for privacy - Sending' reported error (0x800CCC0D) : 'Cannot find the e-mail s Using Outlook 3
S Remove modal window when sending through IE's 'Send Page by E-mail' Using Outlook 2
B my outlook has stopped receiving and sending e mails to and from my aol e mail Using Outlook 3
J Outlook 2010 account for sending mail only Using Outlook 2
D Sending mail not working for one user account Exchange Server Administration 1
B Outlook Express E-mail Sending Error Message Using Outlook 1
L Sudden problem with sending receiving att.net e-mail account accessed through outlook 2007 Using Outlook 3
N Stop accepting connections for sending e-mail from users not having a mailbox Exchange Server Administration 6
C Having problems with taking items out of one folder and sending them into inbox or sending items back to my e-mail address of Email removed for privac Using Outlook 2
V Exchange 2010 - problem sending mail from one server Exchange Server Administration 5
M Re: Sending e-mail through Outlook 2003 Using Outlook 1
D Sending mail from an IMAP account does not store sent mail on the correct folder Using Outlook 1
F Mail Delivery Errors sending to any Hotmail account recipients.__ Using Outlook 2
R Sending e-mail Outlook 2003(SMTP) using SSL and port 587 Using Outlook 4
M Sending e-mail through Outlook 2003 Using Outlook 1
C Outlook 2010 sending out blank emails in reply to incoming mail- of it's own accord. Using Outlook 1
B Sending E-Mail Using Outlook 2
I Outlook 2007 showing 2 e-mail addresses instead of 1 when sending e-mail to recipients using Outlook 2007. Using Outlook 2
B Re: Outlook Forms E-mail Creation Sending Blank Fields Outlook VBA and Custom Forms 1
C Sending e-mail from other account Outlook VBA and Custom Forms 1
H VBA about sending e-mail automatickly Outlook VBA and Custom Forms 1
B Outgoing mail not sent - 'Sending' reported error (0x8004210B)'. Outlook 2007, XP, Hotmail Using Outlook 8
D Check whether mail item is proper for sending or not Outlook VBA and Custom Forms 5
H using macro for sending multiple mail in outlook Outlook VBA and Custom Forms 1
M Change the account from sending e-mail Outlook VBA and Custom Forms 3
N Automating Outlook 2007 problem with sending mail Outlook VBA and Custom Forms 1
T need help w/ sending an e-mail -- outlook 2007 addin Outlook VBA and Custom Forms 2
R Microsoft Outlook 2016 - Gmail not sending, asks for password for SMTP, tried different ports Using Outlook 23
A Flag Message for Follow Up after sending Outlook VBA and Custom Forms 1
D Sending email from Office 365 alias in Outlook Using Outlook 3
E Change sending account depending on Subjectline Outlook VBA and Custom Forms 0
L unblocking attachments before sending Office 365 Advanced Protection Using Outlook 0
B Outlook 2003 email sending & receiving suddenly stopped working Using Outlook 3
R Warn before sending message Outlook VBA and Custom Forms 4

Similar threads

Top