“发送给邮件收件人” [英] "Send To Mail Recipient"

查看:162
本文介绍了“发送给邮件收件人”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何通过

电子邮件以类似于Send To\Mail Recipient的方式获取VB中的按钮以发送文本框的内容。功能

您可以通过右键单击Windows资源管理器中的文件来选择吗?


我希望用户点击一个按钮,它会在用户默认电子邮件中午餐

客户端并将多行文本框的内容放在

消息的正文和标题框中另一个文本框的内容中,并且是

坐在那里读取他们输入收件人的姓名并点击发送。

我认为这很容易实现,但我不知道从哪里开始。

How can I get a button in VB to send the contents of a text box via
email in a manner similar to the "Send To\Mail Recipient" functionality
that you can select via right clicking a file in Windows Explorer?

I want the user to click a button and it lunch the users default email
client and put the contents of a multi line text box in the body of the
message and the contents of another text box in the title box and be
sitting there read for them to type the recipient''s name and hit send.
I assume this is easily doable but I don''t know where to begin.

推荐答案

这是一个例子:
http://www.ostrosoft.com/smtp_component/smtp_vbnet.asp

" cj" < cj@nospam.nospam>在留言中写道

新闻:%2 **************** @ TK2MSFTNGP03.phx.gbl ...
Here''s an example:
http://www.ostrosoft.com/smtp_component/smtp_vbnet.asp

"cj" <cj@nospam.nospam> wrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
怎么能我在VB中得到一个按钮,通过电子邮件以类似于Send To\Mail Recipient的方式发送文本框的内容。您可以通过右键单击Windows资源管理器中的文件来选择的功能吗?

我希望用户点击一个按钮,它会在用户默认的电子邮件客户端午餐时放入内容并放置内容消息正文中的多行文本框和标题框中另一个文本框的内容,并坐在那里阅读
,以便他们输入收件人的姓名并点击发送。我认为这很容易实现,但我不知道从哪里开始。
How can I get a button in VB to send the contents of a text box via email in a
manner similar to the "Send To\Mail Recipient" functionality that you can
select via right clicking a file in Windows Explorer?

I want the user to click a button and it lunch the users default email client
and put the contents of a multi line text box in the body of the message and
the contents of another text box in the title box and be sitting there read
for them to type the recipient''s name and hit send. I assume this is easily
doable but I don''t know where to begin.



实际发送电子邮件。这令人印象深刻,但我只想

启动默认电子邮件程序,创建新邮件并填写

主题并在邮件正文中添加一些文字。留给这个人

进行审核,更改和发送。

Mike Lowery写道:
That actually sends the email. That''s impressive, but I just wanted to
launch the default email program, create a new message and fill in the
subject and add some text to the message body. Leave it for the person
to review, change and send.
Mike Lowery wrote:
这是一个例子:
http://www.ostrosoft.com/smtp_component/smtp_vbnet.asp

cj < cj@nospam.nospam>在消息中写道
新闻:%2 **************** @ TK2MSFTNGP03.phx.gbl ...
Here''s an example:
http://www.ostrosoft.com/smtp_component/smtp_vbnet.asp

"cj" <cj@nospam.nospam> wrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
我如何获得一个按钮在VB中,以类似于Send To\Mail Recipient的方式通过电子邮件发送文本框的内容。您可以通过右键单击Windows资源管理器中的文件来选择的功能吗?

我希望用户点击一个按钮,它会在用户默认的电子邮件客户端午餐时放入内容并放置内容消息正文中的多行文本框和标题框中另一个文本框的内容,并坐在那里阅读
,以便他们输入收件人的姓名并点击发送。我认为这很容易实现,但我不知道从哪里开始。
How can I get a button in VB to send the contents of a text box via email in a
manner similar to the "Send To\Mail Recipient" functionality that you can
select via right clicking a file in Windows Explorer?

I want the user to click a button and it lunch the users default email client
and put the contents of a multi line text box in the body of the message and
the contents of another text box in the title box and be sitting there read
for them to type the recipient''s name and hit send. I assume this is easily
doable but I don''t know where to begin.




AKAIK,最简单的方法是使用经典的MAPI32 ActiveX

控件......是的,它适用于默认的任何电子邮件(包括Outlook

和OE以及任何遵循Windows标准的电子邮件客户端... ...你可以从.NET使用它。$ />
http://activex.microsoft.com/controls/vb6/MSMAPI32.CAB


不确定.NET 2.0是否具有内置功能....但如果没有.NET替代方案,在.NET中使用COM组件应该没有

的耻辱... 。

Visual Studio IDE本身就是一个BIG * COM *应用程序。


我想你添加对

MSMAPI32.OCX:


MAPISession1.DownLoadMail = False

MAPISess ion1.SignOn

MAPISession1.NewSession = True


MAPIMessages1.SessionID = MAPISession1.SessionID


MAPIMessages1.Compose

MAPIMessages1.RecipAddress =" so ***** @ somewhere.com"

MAPIMessages1.msgSubject =" My subject"
MAPIMessages1.msgNoteText =" bla bla bla"


''留下这个以保持窗户打开

MAPIMessages1.Send

MAPISession1.SignOff

MAPISession1.NewSession = False

-

-C。 Moya
www.cmoya.com

" CJ" < cj@nospam.nospam>在消息中写道

新闻:uN ************* @ TK2MSFTNGP03.phx.gbl ...
AKAIK, the easiest way to do this is using the classic MAPI32 ActiveX
controls... yes it works with whatever e-mail is the default (both Outlook
and OE and any E-mail client that follows Windows Standards)... and you can
use it from .NET.

http://activex.microsoft.com/controls/vb6/MSMAPI32.CAB

Not sure if .NET 2.0 has the feature built-in.... but there should be no
shame in using COM components in .NET if there no .NET alternative....
Visual Studio IDE itself is a BIG *COM* application.

Example that I think does what you ask once you add a reference to
MSMAPI32.OCX:

MAPISession1.DownLoadMail = False
MAPISession1.SignOn
MAPISession1.NewSession = True

MAPIMessages1.SessionID = MAPISession1.SessionID

MAPIMessages1.Compose
MAPIMessages1.RecipAddress = "so*****@somewhere.com"
MAPIMessages1.msgSubject = "My subject"
MAPIMessages1.msgNoteText = "bla bla bla"

''leave this out to keep the window open
MAPIMessages1.Send

MAPISession1.SignOff
MAPISession1.NewSession = False
--
-C. Moya
www.cmoya.com
"cj" <cj@nospam.nospam> wrote in message
news:uN*************@TK2MSFTNGP03.phx.gbl...
实际发送电子邮件。这令人印象深刻,但我只是想启动默认电子邮件程序,创建新邮件并填写
主题并在邮件正文中添加一些文本。留给它来审核,更改和发送。

Mike Lowery写道:
That actually sends the email. That''s impressive, but I just wanted to
launch the default email program, create a new message and fill in the
subject and add some text to the message body. Leave it for the person to
review, change and send.
Mike Lowery wrote:
这是一个例子:
http://www.ostrosoft.com/smtp_component/smtp_vbnet.asp

" cj" < cj@nospam.nospam>在消息中写道
新闻:%2 **************** @ TK2MSFTNGP03.phx.gbl ...
Here''s an example:
http://www.ostrosoft.com/smtp_component/smtp_vbnet.asp

"cj" <cj@nospam.nospam> wrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
我如何获得一个按钮在VB中,以类似于Send To\Mail Recipient的方式通过电子邮件发送文本框的内容。功能
您可以通过右键单击Windows资源管理器中的文件进行选择吗?

我希望用户点击一个按钮,它会在用户默认的电子邮件客户端午餐并放置内容
消息正文中的多行文本框和标题框中另一个文本框的内容,并且坐在那里读取,以便他们键入收件人的姓名并点击发送。我认为这很容易实现,但我不知道从哪里开始。
How can I get a button in VB to send the contents of a text box via
email in a manner similar to the "Send To\Mail Recipient" functionality
that you can select via right clicking a file in Windows Explorer?

I want the user to click a button and it lunch the users default email
client and put the contents of a multi line text box in the body of the
message and the contents of another text box in the title box and be
sitting there read for them to type the recipient''s name and hit send. I
assume this is easily doable but I don''t know where to begin.






这篇关于“发送给邮件收件人”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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