使用System.Web.Mail进行电子邮件编程 [英] Email Programming using System.Web.Mail

查看:108
本文介绍了使用System.Web.Mail进行电子邮件编程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经能够使用命名空间System.Web.Mail及其方法

Smtp.mail.send将简单的短信邮寄到

中的一个小组55岁及以上的社区。我需要帮助扩展程序

功能。搜索这个论坛我没有找到任何相关的

信息,所以如果我选择不好,我会很感激

建议更合适的dotnet论坛。


现在我希望发送密送的能力而不是:(将是发送给所有250名居民的
,并且必须以50人为一组发送
康卡斯特需要
来限制垃圾邮件发送者)并且还想知道这个

命名空间是否处理base64编码以便我可以发送pdf附件。

欣赏,


Ed

I have been able using the namespace System.Web.Mail and its method
Smtp.mail.send to mail simple text messages to a small group within
our 55 and older community. I need help expanding the programs
capabilities. Searching this forum I did not find any related
information so if I have chosen poorly, I would appreciate a
suggestion of a more appropriate dotnet forum.

Now what I wish is the ability to send bcc''s rather than to: (would be
sending to all 250 residents and would have to send in groups of 50 as
required by Comcast to curtail spammers) and also wonder if this
namespace handles base64 encoding so that I can send a pdf attachment.
Appreciate,

Ed


推荐答案

嗯,第一步是而不是检查文档而不是找到一个合适的组合; /)


尝试:
http://msdn2.microsoft.com/en-us/lib .. .e_members.aspx

(你会找到BCC)。


By浏览到你会看到的附件:
http://msdn2.microsoft.com/en-us/lib...t_members.aspx

for Encoding属性。

注意这是1.1它在2.0中已经过时了(参见System.Net.Mail)。


-

Patrice


Ed Bitzer < ed ****** @yahoo.comaécritdansle message de news:
u0 ************* @ TK2MSFTNGP06.phx.gbl ...
Well, the first step would be rather to check the doc rather than to find a
suitable group ;-)

Try :
http://msdn2.microsoft.com/en-us/lib...e_members.aspx
(you''ll find BCC).

By browsing to attchments you''ll see :
http://msdn2.microsoft.com/en-us/lib...t_members.aspx
for the Encoding property.

Note that this is 1.1 It is obsolete in 2.0 (see System.Net.Mail).

--
Patrice

"Ed Bitzer" <ed******@yahoo.coma écrit dans le message de news:
u0*************@TK2MSFTNGP06.phx.gbl...

>我有能够使用命名空间System.Web.Mail及其方法

Smtp.mail.send将简单的短信邮寄到我们55岁及以上社区的一个小组内。我需要帮助扩展程序

功能。搜索这个论坛我没有找到任何相关的

信息,所以如果我选择不好,我会很感激

建议更合适的dotnet论坛。


现在我希望发送密送的能力而不是:(将是发送给所有250名居民的
,并且必须以50人为一组发送
康卡斯特需要
来限制垃圾邮件发送者)并且还想知道这个

命名空间是否处理base64编码以便我可以发送pdf附件。

欣赏,


Ed

>I have been able using the namespace System.Web.Mail and its method
Smtp.mail.send to mail simple text messages to a small group within
our 55 and older community. I need help expanding the programs
capabilities. Searching this forum I did not find any related
information so if I have chosen poorly, I would appreciate a
suggestion of a more appropriate dotnet forum.

Now what I wish is the ability to send bcc''s rather than to: (would be
sending to all 250 residents and would have to send in groups of 50 as
required by Comcast to curtail spammers) and also wonder if this
namespace handles base64 encoding so that I can send a pdf attachment.
Appreciate,

Ed



1月16日下午12:19, Ed Bitzer < edbit ... @ yahoo.comwrote:
On Jan 16, 12:19 pm, "Ed Bitzer" <edbit...@yahoo.comwrote:

我已经能够使用命名空间System.Web.Mail及其方法

Smtp.mail.send将简单的短信邮寄给我们55岁及以上社区的一个小团体。我需要帮助扩展程序

功能。搜索这个论坛我没有找到任何相关的

信息,所以如果我选择不好,我会很感激

建议更合适的dotnet论坛。


现在我希望发送密送的能力而不是:(将是发送给所有250名居民的
,并且必须以50人为一组发送
康卡斯特需要
来限制垃圾邮件发送者)并且还想知道这个

命名空间是否处理base64编码以便我可以发送pdf附件。

欣赏,


Ed
I have been able using the namespace System.Web.Mail and its method
Smtp.mail.send to mail simple text messages to a small group within
our 55 and older community. I need help expanding the programs
capabilities. Searching this forum I did not find any related
information so if I have chosen poorly, I would appreciate a
suggestion of a more appropriate dotnet forum.

Now what I wish is the ability to send bcc''s rather than to: (would be
sending to all 250 residents and would have to send in groups of 50 as
required by Comcast to curtail spammers) and also wonder if this
namespace handles base64 encoding so that I can send a pdf attachment.
Appreciate,

Ed



虽然它可能无法帮助编码(不确定)两个优秀的网站
$ b您需要查看的$ b是:

http:// www。 systemwebmail.com/



http://www.systemnetmail.com/

IMO如果您使用的是2.0或更高版本呃,你应该使用System.Net.Mail


谢谢,


Seth Rowe [MVP]

Though it might not help with encoding (not sure) two excellent sites
you need to check out are:

http://www.systemwebmail.com/

And

http://www.systemnetmail.com/

IMO if you are using 2.0 or higher you should be using System.Net.Mail

Thanks,

Seth Rowe [MVP]


Ed,


这是我将文件附加到通过System.Net.Mail发送的电子邮件的方式:

Private Sub AddAttachment(ByRef message)作为MailMessage,ByVal sFile As

String)

Dim attFile作为附件

昏暗的处置作为ContentDisposition


attFile =新附件(sFile)

disposition = attFile.ContentDisposition

disposition.CreationDate = System.IO.File.GetCreationTime(sFile)

disposition.ModificationDate =

System.IO.File.GetLastWriteTime(sFile)

disposition.ReadDate = System.IO.File.GetLastAccessTime(sFile)

message.Attachments.Add(attFile)

End Sub


MailMessage对象确实有Bcc属性,因此您可以添加Bcc地址< br $> b $ b(不知道多少):

Dim adrBcc As MailAddress


adrBcc =新邮件地址(" ad ** @ your.com")

message.Bcc.Add(adrBcc)


adrBcc =新邮件地址( ad ** @ your.com)

message.Bcc.Add(adrBcc)

...


希望这会有所帮助,

Thomas

Ed Bitzer < ed ****** @ yahoo.comschrieb im Newsbeitrag

news:u0 ************* @ TK2MSFTNGP06.phx.gbl ...
Ed,

This is how I attach files to eMails sent via System.Net.Mail:
Private Sub AddAttachment(ByRef message As MailMessage, ByVal sFile As
String)
Dim attFile As Attachment
Dim disposition As ContentDisposition

attFile = New Attachment(sFile)
disposition = attFile.ContentDisposition
disposition.CreationDate = System.IO.File.GetCreationTime(sFile)
disposition.ModificationDate =
System.IO.File.GetLastWriteTime(sFile)
disposition.ReadDate = System.IO.File.GetLastAccessTime(sFile)
message.Attachments.Add(attFile)
End Sub

The MailMessage object does have a Bcc property, so you can add Bcc adresses
(don''t know how many):
Dim adrBcc As MailAddress

adrBcc = New MailAddress("ad**@your.com")
message.Bcc.Add(adrBcc)

adrBcc = New MailAddress("ad**@your.com")
message.Bcc.Add(adrBcc)
...

Hope this helps,
Thomas
"Ed Bitzer" <ed******@yahoo.comschrieb im Newsbeitrag
news:u0*************@TK2MSFTNGP06.phx.gbl...

>我已经能够使用命名空间System.Web.Mail及其方法

Smtp.mail.send将简单的短信邮寄到

中的一个小团体我们55岁以上的社区。我需要帮助扩展程序

功能。搜索这个论坛我没有找到任何相关的

信息,所以如果我选择不好,我会很感激

建议更合适的dotnet论坛。


现在我希望发送密送的能力而不是:(将是发送给所有250名居民的
,并且必须以50人为一组发送
康卡斯特需要
来限制垃圾邮件发送者)并且还想知道这个

命名空间是否处理base64编码以便我可以发送pdf附件。

欣赏,


Ed


>I have been able using the namespace System.Web.Mail and its method
Smtp.mail.send to mail simple text messages to a small group within
our 55 and older community. I need help expanding the programs
capabilities. Searching this forum I did not find any related
information so if I have chosen poorly, I would appreciate a
suggestion of a more appropriate dotnet forum.

Now what I wish is the ability to send bcc''s rather than to: (would be
sending to all 250 residents and would have to send in groups of 50 as
required by Comcast to curtail spammers) and also wonder if this
namespace handles base64 encoding so that I can send a pdf attachment.
Appreciate,

Ed




这篇关于使用System.Web.Mail进行电子邮件编程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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