Mail sent by code doesn't show in the Sent folder

I have written code to send email and it contains the statement “Memo.SaveMessageOnSend = True” and the documents that are sent do not show up in the Sent view of Mail. Any suggestions.

Subject: Mail sent by code doesn’t show in the Sent folder

Is the document being created in the user’s mail database?

Subject: RE: Mail sent by code doesn’t show in the Sent folder

No - the document is in another dbs - and I want to send a “notice” about it. Does it need to be a Mail document to start with??

Subject: RE: Mail sent by code doesn’t show in the Sent folder

No, but if the document isn’t created in the user’s mail database, it cannot appear in Sent. Sent selects documents that have been posted (PostedDate is not empty) but have not been delivered (DeliveredDate is empty). That can only happen if the document was sent from the database (or copied to the database after sending).

Subject: Mail sent by code doesn’t show in the Sent folder

Keep in mind the Sent view’s selection formula.

SELECT DeliveredDate = “” & PostedDate != “” & !(@IsMember(“S”; ExcludeFromView))

Dump the field vals post save to ensure they match the formula above.

Subject: RE: Mail sent by code doesn’t show in the Sent folder

It’s difficult for me to change that - we prefer to “stay out of the mail code” if at all possible.

And thanks for the response.

Walt