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

  • Thread starter Thread starter Q2hyaXMgTWlsbGVy
  • Start date Start date
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
 
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
 
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


>
 
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

> >
 
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 Using Outlook 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 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
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
W Outlook 2021 Hanging on "Sending Emails" Using Outlook 3
Fozzie Bear Calendar Events created on iPhone have suddenly start sending invitations to attendees Using Outlook 2
D Prompt to prefix subject line whenever sending an email Outlook VBA and Custom Forms 3
P default font when sending email from browser Using Outlook 1
M Messages Intermittently Dont Arrive In Sent Items After Sending Successfully Using Outlook 4
O Outlook on Android: after sharing / sending a news article, draft remains open. Why? Using Outlook 1
P Sending email from outlook IMAP to GMAIL where embedded images are added as attachment Using Outlook 1
V Form data not sending for some users Outlook VBA and Custom Forms 2
L isn't there an OL add-on that flags addressee before sending Using Outlook 3
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
HarvMan Hotmail - Sending email is undeliverable Using Outlook 4
A Sending contact vcards sends older version instead of updated version Using Outlook 4
M McAllister Outlook stops Sending/Receiving/Synching after disconnecting remote desktop session Using Outlook 2
D Adding Enterprise Exchange Email Account to Outlook Prevents Sending via Outlook.com Account Using Outlook.com accounts in Outlook 10
B When sending an email, I am showing 2 of my address's Using Outlook 1
M Auto expand Distribution List Before Sending Email Outlook VBA and Custom Forms 1
A Check for words in subject header before sending email Outlook VBA and Custom Forms 4
O Run macro automatically at sending an email Using Outlook 11
W Sending To Wrong Account Using Outlook 15
H Select Specific Account When Sending Email, Based on Current Folder Outlook VBA and Custom Forms 1

Similar threads

Back
Top