如何在Windows应用程序中阅读邮件 [英] How to read mails in windows application

查看:82
本文介绍了如何在Windows应用程序中阅读邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

先生,


我们可以从使用vb.net开发的Windows应用程序的电子邮件帐户中接收带有附件的电子邮件吗?

请帮助我


谢谢.

sir,


can we receive emails with attachments from email account in windows application which is developed using vb.net ?

please help me


Thank you.

推荐答案

公共函数CreateMail(ByVal sTo As String,_
ByVal sCc作为字符串,_
ByVal sBcc作为字符串,_
ByVal sSubject作为字符串,_
ByVal sBody作为字符串,_
ByVal sAttach作为字符串,_
ByVal sService作为字符串,_
ByVal lFolder As Integer)As Integer

CreateMail = sCreateMail(sTo,sCc,sBcc,sSubject,sBody,sAttach,_
sService,lFolder,SapphireMailLicence)
最终功能


Public Sub ReadMail(ByVal sService As String,_
ByVal lFolder As Integer,_
ByVal lReadEntry作为整数,_
ByRef sSenderName作为字符串,_
ByRef sSenderEmail作为字符串,_
ByRef sSubject作为字符串,_
ByRef lAttachment As Integer,_
ByRef sBody As String)

昏暗的sReadSenderName作为字符串
昏暗的sReadSenderEmail作为字符串
昏暗的sReadSubject作为字符串
昏暗的sReadBody作为字符串
Dim lReturn as Integer

sReadSenderName =空格(1024)
sReadSenderEmail =空格(1024)
sReadSubject =空格(1024)
sReadBody =空格(1024)
lReturn = sReadMail(sService,lFolder,lReadEntry,_
sReadSenderName,sReadSenderEmail,_
sReadSubject,附件,sReadBody,_
SapphireMailLicence)
sSenderName = StripString(sReadSenderName)
sSenderEmail = StripString(sReadSenderEmail)
sSubject = StripString(sReadSubject)
sBody = StripString(sReadBody)
结束子






















< a href ="http://www.cfvb.net/mail.html"> http://www.cfvb.net/mail.html</a> [< a href ="http://www.cfvb.net/mail.html"target =" _ blank"title ="新窗口> ^</a>]
Public Function CreateMail(ByVal sTo As String, _
ByVal sCc As String, _
ByVal sBcc As String, _
ByVal sSubject As String, _
ByVal sBody As String, _
ByVal sAttach As String, _
ByVal sService As String, _
ByVal lFolder As Integer) As Integer

CreateMail = sCreateMail(sTo, sCc, sBcc, sSubject, sBody, sAttach, _
sService, lFolder, SapphireMailLicence)
End Function


Public Sub ReadMail(ByVal sService As String, _
ByVal lFolder As Integer, _
ByVal lReadEntry As Integer, _
ByRef sSenderName As String, _
ByRef sSenderEmail As String, _
ByRef sSubject As String, _
ByRef lAttachment As Integer, _
ByRef sBody As String)

Dim sReadSenderName As String
Dim sReadSenderEmail As String
Dim sReadSubject As String
Dim sReadBody As String
Dim lReturn As Integer

sReadSenderName = Space(1024)
sReadSenderEmail = Space(1024)
sReadSubject = Space(1024)
sReadBody = Space(1024)
lReturn = sReadMail(sService, lFolder, lReadEntry, _
sReadSenderName, sReadSenderEmail, _
sReadSubject, lAttachment, sReadBody, _
SapphireMailLicence)
sSenderName = StripString(sReadSenderName)
sSenderEmail = StripString(sReadSenderEmail)
sSubject = StripString(sReadSubject)
sBody = StripString(sReadBody)
End Sub






















<a href="http://www.cfvb.net/mail.html">http://www.cfvb.net/mail.html</a>[<a href="http://www.cfvb.net/mail.html" target="_blank" title="New Window">^</a>]


这篇关于如何在Windows应用程序中阅读邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆