Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Placing sent emails in the 'SENT' folder
#1
Ok, so I have a series of project folders that each contain project files.

I wrote some code to email them using the 'SmtpMail' and mail.AddMessage.

This works well so far but I would like to show the sent messages in my 'SENT' folder.

I realize that QM uses outlook express as the mail utility but I normally use Outlook or gmail if that makes any difference.

My code so far:


Code:
Copy      Help
SmtpMail mail
Dir d
str filepath
ARRAY(str) filetosend.create(10)
str attachments
int i
int x=0


lpstr folder=dir("C:\Projects\*" 1) ;; get the folder names
rep
,for i 0 10
,,filetosend[i]=0 ;;initialize the array to zeroes
,if(folder = 0) break
,out folder
,x=0
,attachments=NULL
,filepath.from("C:\Projects\" folder "\*")
,foreach d filepath FE_Dir ;;for each file in the folder
,,filetosend[x]=d.FileName(1) ;;get full pathname for the file
,,out filetosend[x]
,,if x=0
,,,attachments.from(filetosend[x] "[]")
,,else
,,,attachments.from(attachments filetosend[x] "[]")
,,x + 1
,out attachments
,mail.AddMessage("[email protected]" folder "Some sample test message text" 1 attachments)
,;;SendMail "[email protected]" folder "Some sample test message text" 1 attachments
,folder=dir("" 1)
mail.Send(0x100)
#2
QM can save sent messages as eml files, but cannot show in Outlook or other programs.

Macro Macro1706
Code:
Copy      Help
mail.SetSaveFolder("......")
mail.Send(0x100|0x800)


Forum Jump:


Users browsing this thread: 1 Guest(s)