/ Forums / Advansys Formativ / Creating Solutions with Formativ / How to delete a draft message??? / Reply To: How to delete a draft message???
MA,
thanks for your suggestion, works fine now without any problem!
Regards,
Jeroen
quote:
Originally posted by MA:
I cannot reproduce the same behaviour. The draft message was removed from the deleted items if I call message.delete. I also noticed you create the draft message in the Mailbox folder. I recommend you create the draft message in the Work-In-Progress folder. Try the code below to remove the draft message from trash entries collection. Hope this helps.————————-
sub ResendMail (Msg)
Dim objMail
Dim objNewMail
Dim objRecipientSet objMail = GroupWise.Account.WorkFolder.Messages.Add(“GW.MESSAGE.MAIL”, fgwDraft)
Set objRecipient = objMail.Recipients.Add(GroupWise.Account.Owner.EmailAddress,,0)With objMail
.Priority = fgwNormal
.FromText = Msg.Sender
.Subject = strPrefix & ” ” & Msg.Subject
.BodyText.PlainText = “============= Orginal Message =============” & _
vbcrlf & vbcrlf & _
Msg.BodyText
End WithSet objNewMail = objMail.Send
‘ Removes from TrashEntries collection.
set oTrashEntry = Groupwise.account.Trash.TrashEntries.ItemEx(objMail.MessageID)
if not oTrashEntry is nothing then
oTrashEntry.Delete
end ifset objNewMail = Nothing
Set objRecipient = Nothing
Set objMail = Nothing
————————-quote:
Originally posted by GoumJer:
MA,thanks for your reply.
Unfortunatly this doesn’t solve my problem. The draft message still is in the deleted items.
Is there a command which does the same as the <shift><del> keyboard combination (really delete)?
Thanks,
Jeroen
[This message was edited by Support 1 on August 18, 2005 at 05:08 PM.]