send email remains in Drafts as unsend; nothing in Send Items

R

Ronald van Aalten

Hi, I use Redemption to send email (outlook XP; no exchange) after
retrieving the email addresses from a contacts folder. The send emails
go into the Drafts folder, ok I understand this is standard Redemption
behaviour but in my case they REMAIN in the drafts folder as being
unsend while the messages ARE send. Nothing in the Outbox and also
nothing in the Send Items folder. This gives me no feedback if the
messages are actually send. How to get them in Send Items?
Here's my code:

Set moNS = goOutl.GetNamespace("MAPI")
moNS.Logon
Set oredCnt = CreateObject("vaMoreUtils.vaSafeContactItem")
For ix = 1 To moItems.Count '= items in a Contacts folder
Set oObj = moItems(ix)
If oObj.Class = olContact Then
oredCnt.item = oObj 'set contact item in redemption
safecontact
sEmail = oredCnt.Email1Address
Set oredMail = CreateObject("vaMoreUtils.vaSafeMailItem")
Set oMail = goOutl.CreateItem(olMailItem)
oredMail.item = oMail
oMail.Body = "this is a test"
oMail.Subject = "this is the subject"
oMail.Save
oredMail.Recipients.Add sEmail
oredMail.Recipients.ResolveAll
oredMail.Send
End If 'oObj.class
Next
Set moUtil = CreateObject("vaMoreUtils.vaMAPIUtils")
moUtil.DeliverNow
moUtil.CleanUp
 
D

Dmitry Streblechenko

Hmmm... I don't thinkI have ever seen that. After you initialize goOutl, do
you log on to MAPI?
set NS = goOutl.GetNamespace("MAPI")
NS.Logon
Does it make any difference if Outlook is running at the time your code is
executed?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
R

Ronald van Aalten

Hi Dmitry,

As you can see in the code I do logon to Mapi:
moNS.Logon
I have created an addin to run the code so oultook has to be
running...
Do you suggest to create an exe and run with Oultlook closed?
After I wrote this message I ran the code in order to send emails to
my
customers. 1800 messages were created in the Drafts folder and after
sending around 800 remained in the drafts folder while the other 1000
DID go to the send items folder. Nevertheless I think ALL messages are
send.

Ronald
 
D

Dmitry Streblechenko

Are you sure they were sent? Are they in the sent state when your open them
from the Drafts folder?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
R

Ronald van Aalten

That's the strange thing: all messages remaining in the Drafts folder
first display a send date and when selected or opened this changes to
'this message has not been send' although they ARE send.
 
D

Dmitry Streblechenko

Hmmm... Does the message come up in the editable state, i.e. can you modify
the body, subject, etc?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 

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