| 上一篇主題 :: 下一篇主題   | 
	
	
	
		| 發表人 | 
		內容 | 
	
	
		liangszpt
 
  
  註冊時間: 2004-11-18 文章: 263 來自: な东省深圳市
  第 1 樓
  | 
		
			
				 發表於: 星期日 八月 28, 2005 10:38 pm    文章主題: 在VFP里,怎么发送一个附档到一个指定的邮箱?(已经搜寻,找不到答案) | 
				     | 
			 
			
				
  | 
			 
			
				在搜索里搜完一遍又一遍,但也找不到很好的答案。或者是我不懂。
 
我的目的很简单,就是有两个TEXTBOX,一个用来填入EMAIL地址,一个用来指定一个特定附档的PATH。
 
然后按确定就发送出去。按下发送以后,希望不要再有人手干预,例如调用OUTLOOK等的邮件软件,还要用户按“发送”的。
 
 
希望各位不嫌麻烦,指点一下。 | 
			 
		  | 
	
	
		| 回頂端 | 
		 | 
	
	
		  | 
	
	
		garfield Site Admin
  
  註冊時間: 2003-01-30 文章: 2160
 
  第 2 樓
  | 
		
			
				 發表於: 星期一 八月 29, 2005 10:33 pm    文章主題:  | 
				     | 
			 
			
				
  | 
			 
			
				資料來源: http://wiki.sunyear.com.tw/index.php?title=%E5%A6%82%E4%BD%95%E5%AF%84%E4%BF%A1
 
 
*************
 
oSession = CREATEOBJECT("MSMapi.MapiSession")
 
oMessage = CREATEOBJECT("MSMapi.MapiMessages")
 
 
oSession.LogonUI = .t.
 
oSession.SignOn
 
 
*-- The message control needs to reference the session control's ID.
 
oMessage.SessionID = oSession.SessionID
 
oMessage.MsgIndex = -1
 
 
*-- Set up our message and send it.
 
oMessage.Compose
 
oMessage.msgsubject = "Attachments sent using FoxPro and MAPI"
 
oMessage.msgnotetext = " Attached are some test files."
 
 
*-- Create an array holding the attachment file names.
 
DIMENSION lcAttachment(2)
 
lcAttachment(1) = home()+ "samples\data\customer.dbf"
 
lcAttachment(2) = home()+ "samples\data\customer.cdx"
 
 
*-- Attach the files.
 
FOR lnCount = 1 TO ALEN(lcAttachment)
 
oMessage.AttachmentIndex = lnCount - 1
 
oMessage.AttachmentPathName = lcAttachment(lnCount)
 
ENDFOR
 
 
*-- Send the message on its way.
 
oMessage.send(1) _________________ 利用>>搜尋<<的功能會比問的還要快得到答案. | 
			 
		  | 
	
	
		| 回頂端 | 
		 | 
	
	
		  | 
	
	
		liangszpt
 
  
  註冊時間: 2004-11-18 文章: 263 來自: な东省深圳市
  第 3 樓
  | 
		
			
				 發表於: 星期一 十月 10, 2005 12:21 pm    文章主題:  | 
				     | 
			 
			
				
  | 
			 
			
				| 收件人地址怎么填? | 
			 
		  | 
	
	
		| 回頂端 | 
		 | 
	
	
		  | 
	
	
		garfield Site Admin
  
  註冊時間: 2003-01-30 文章: 2160
 
  第 4 樓
  | 
		
			
				 發表於: 星期一 十月 10, 2005 11:22 pm    文章主題:  | 
				     | 
			 
			
				
  | 
			 
			
				搜尋 mapi address
 
找到了,加入以下指令即可.
 
oMessage.RECIPADDRESS="xxx@abc.com.tw" _________________ 利用>>搜尋<<的功能會比問的還要快得到答案. | 
			 
		  | 
	
	
		| 回頂端 | 
		 | 
	
	
		  | 
	
	
		 |