2021-01-31

IMAP Configuration issues - "Sent items" not saving in Outlook and WLM - Windows Live Mail

I've just passed through a weird issue, when after reconfiguring Outlook Mail, the "Sent items" folder was not showing the sent e-mails. Of course, I made sure to tick the checkbox that tells to store the sent items.

After a long search, I found the most ridiculous solution from "Hawk", at:

https://answers.microsoft.com/en-us/windowslive/forum/livemail-files/windows-live-mail-my-sent-items-are-no-longer/b9d6f6eb-0072-4d5f-875c-55ce01d81e87

This problem is very easy to fix if this is an IMAP mail folder.


You may notice that your drafts aren't saving either, in fact nothing is going into the folders from your computer when you produce a mail. You may find that mail produced from other devices appears, but not the mail from your windows 7 computer. You may also notice that your folders, Drafts, Junk E-mail, etc are not positioned at the left hand side of the list, but are in fact tabbed across a bit, right of the inbox. Is this so?


The Solution is simple:


1) Right Click on the account and open Properties

2) Go to the IMAP tab.

3) Enter "Inbox" into the Root folder path *AND HERE's THE TRICK: IT MUST BE "Inbox", not "inbox" the entry is case sensitive.

4) Press apply and let the folders reorganise themselves. They should now reload and all be on the left hand side.


Done. New sent items, drafts etc will now move to the correct folders.

2021-01-23

PUTFILE function as originally typed (not in uppercase)

As already discussed in Fox.Wikis - "VFP has always been a bit funny about filename cases. More specifically, how it works with filename case is not documented. It will translate filenames to lower case in some cases, and to upper in others, and leave it alone in yet others." PUTFILE is in that list of strange functions, always returning UPPERCASE file names. So here's a short function that I've been using that returns the chosen filename the way the user typed.

The parameters and usage is exactly the same as the VFP original PUTFILE function:

FUNCTION XPUTFILE(tcCustomText, tcFileName, tcFileExt)

	* Usage:
	* ? PUTFILE("Save file as...", "MyFile.PDF", "PDF;TXT;*")

	#DEFINE COMMDLOG_DEFAULT_FLAG 	0x00080000
	#DEFINE COMMDLOG_RO 			4
	#DEFINE COMMDLOG_MULTFILES 		512

	LOCAL lcSetDefa
	m.lcSetDefa = SET("Default") + CURDIR()

	LOCAL loDlgForm AS "Form"
	m.loDlgForm = CREATEOBJECT("Form")
	m.loDlgForm.ADDOBJECT("oleObject1", "oleComDialObject")

	LOCAL loDlg
	m.loDlg = m.loDlgForm.OleObject1

	LOCAL lcFilter, lcFileExt, lnExtCount, n
	IF NOT EMPTY(tcFileExt)
		lnExtCount = GETWORDCOUNT(m.tcFileExt, ";")
		lcFilter = ""
		FOR n = 1 TO lnExtCount
			lcFileExt = GETWORDNUM(m.tcFileExt, n, ";")
			IF lcFileExt = "*"
				lcFilter = lcFilter + "All files|*.*"
			ELSE 
				lcFilter = lcFilter + lcFileExt + " files|*." + lcFileExt && EVL(tcFileExt, "All files|*.*")
			ENDIF			
			IF n < lnExtCount
				lcFilter = lcFilter + "|"
			ENDIF 
		ENDFOR
	ELSE
		lcFilter = "*.*|*.*" && EVL(tcFileExt, "All files|*.*")
	ENDIF 

	m.loDlg.FILTER		= lcFilter
	m.loDlg.FileName	= EVL(m.tcFileName, "")
	m.loDlg.DialogTitle	= EVL(m.tcCustomText, "Save file as...")
	m.loDlg.FLAGS		= COMMDLOG_RO + COMMDLOG_DEFAULT_FLAG
	m.loDlg.MaxFileSize	= 256

	LOCAL lnResult AS INTEGER, lcFileName
	* lnResult = loDlg.ShowOpen()
	m.lnResult = m.loDlg.ShowSave()

	* Restore the original directory
	SET DEFAULT TO (m.lcSetDefa)

	IF EMPTY(m.loDlg.FileTitle) && Clicked 'Cancel'
		m.lcFileName = ""
	ELSE
		m.lcFileName = m.loDlg.FileName
	ENDIF
	m.loDlgForm = NULL
	RETURN m.lcFileName


DEFINE CLASS oleComDialObject AS OLECONTROL
	OLECLASS ="MSComDlg.CommonDialog.1"
ENDDEFINE