精华区 [关闭][返回]

当前位置:网易精华区>>讨论区精华>>编程开发>>● Powerbuilder>>PB开发Internet应用>>Re: 如何利用mailsend()函数发送附件

主题:Re: 如何利用mailsend()函数发送附件
发信人: wangan()
整理人: leitiger(2002-06-05 23:51:50), 站内信件
【 在 fangpeng (fang) 的大作中提到: 】
: 各位高人: 
:     请问如何利用mailsend()函数发送附件。 
: 本人将无胜感激! 
:                    
:    .......

mailSession mSes
mailReturnCode mRet
mailMessage mMsg


mSes = create mailSession
mRet = mSes.mailLogon ( mailNewSession! )

If mRet <> mailReturnSuccess! Then Return

mMsg.notetext = "Demo Text"
mMsg.Recipient[1].Name = "Adress"
mMsg.Recipient[1].Address = "SMTP:[email protected]"
mMsg.AttachmentFile[1].FileType = mailAttach! 
mMsg.AttachmentFile[1].Filename = "DEMO.BIN"
mMsg.AttachmentFile[1].Pathname = "DEMO.BIN"
mMsg.AttachmentFile[1].Position = 0
mRet = mSes.mailsend ( mMsg )
If mRet <> mailReturnSuccess! Then Return
mSes.mailLogOff()
Destroy mSes


--
情深不寿,强极则辱。谦谦君子,温润如玉。

※ 来源:.月光软件站 http://www.moon-soft.com.[FROM: 202.110.17.241]

[关闭][返回]