A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Tags: , , , ,

Redemption e-mail going to draft folder





 
 
Thread Tools Display Modes
  #1  
Old June 14th 06, 02:15 PM posted to microsoft.public.outlook.program_addins
simonkue
external usenet poster
 
Posts: 4
Default Redemption e-mail going to draft folder

I have a VB6 pgm that used to generate outlook e-mails correctly prior to
v2002. Now I need Redemption. I can generate the e-mail but it goes to the
drafts folder and not directly to the Outbox. I can copy from Draft to Outbox
but it is not ready to be sent and needs to be individually entered and sent.
I should be able to generate e-mail directly to the Outbox. What am I doing
wrong?
Using Win2k and XP, Outlook 2k and 2002 - same results.
The following code is a routine called for each e-mail so that there is only
1 To and no cc or bcc per e-mail.

Function CreateMail(xsRecip As Variant, xsSubject As String, xsMsg As
String, _
Optional xsAttachments As String) As Boolean

' Create new e-mail

Dim xvRecip As Variant
Dim xvAttach As Variant
Dim xbResolveOK As Boolean
Dim xnLen As Integer

Dim oMailItem As Object
Dim oMail As Object

Dim myNameSpace As NameSpace
Dim myFolder As Object

Dim SafeItem, oItem

On Error GoTo CreateMail_Err

' Get the message text. If xsMsg=Clipboard, then that is where the text is
If xsMsg = "Clipboard" Then
xsMsg = Clipboard.GetText
End If

xnLen = Len(xsMsg) + 1

Set Application = CreateObject("Outlook.Application")
Set myNameSpace = Application.GetNamespace("MAPI")
myNameSpace.Logon
Set myFolder = myNameSpace.GetDefaultFolder(4) 'olFolderOutbox

Set SafeItem = CreateObject("Redemption.SafeMailItem")
Set oItem = Application.CreateItem(olMailItem)
SafeItem.Item = oItem

With SafeItem
.Item = oItem
.Recipients.Add xsRecip
xbResolveOK = .Recipients.ResolveAll

' Note that the attachment must have the full file path. File name alone
isn't good enough!

If Not IsMissing(xsAttachments) And xsAttachments "" Then
.Attachments.Add xsAttachments, olByValue, xnLen, "Enclosed file"
End If
.Subject = xsSubject
.Body = xsMsg
If xbResolveOK Then
On Error GoTo 0
.Save
.ExpiryTime = .CreationTime
' .Send
.CopyTo myFolder
Else
MsgBox "Unable to resolve recipient. Please check " & xsRecip
.Display
End If
End With

CreateMail = True

'Set oMailItem = Nothing
'Set orSafeMailItem = Nothing
'Set xgolApp = Nothing
'
CreateMail_End:
Exit Function

CreateMail_Err:
CreateMail = False
Resume CreateMail_End
End Function


Ads
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Redemption emails to draft folder simonkue Add-ins for Outlook 7 June 14th 06 11:52 PM
Macro to Move Mail Messages from Draft folder to other folders VBnovice Outlook and VBA 4 June 14th 06 07:10 PM
Contents of Draft Folder Missing ddlaz Outlook - Installation 1 June 9th 06 06:50 AM
outlook draft folder has small pencil icon scott Outlook - General Queries 3 June 9th 06 12:40 AM
Draft Folder problem Peter Brown Outlook - General Queries 1 May 17th 06 07:53 AM


All times are GMT +1. The time now is 03:45 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2008 Outlook Banter, part of the NewsgroupBanter project.
The comments are property of their posters.
Carcasherdotcom Seocontest - Debt Loans - Credit Card - Credit Cards - Car Finance