使用asp.net 1.1中的通讯组列表(DL)发送电子邮件 [英] Send email using Distribution List(DL) in asp.net 1.1

查看:83
本文介绍了使用asp.net 1.1中的通讯组列表(DL)发送电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我在发送电子邮件到通讯组列表(DL)下方有一个代码.但是收件人电子邮件地址之一在DL中无效.我无法至少将电子邮件发送到有效的电子邮件地址.

我的问题是,即使DL中的电子邮件地址无效,如何将电子邮件发送到.net 1.1中的有效收件人,我也收到如下异常:
服务器拒绝了一个或多个收件人地址.

1.1中的代码

Hi all,

I have a code below sending email to the Distribution list(DL).But one of the recipient email address is invalid in the DL.I was unable to send the email to the valid email addresses atleast.

My question is how can i send the email to valid recipients in .net 1.1 even if there is invalid email address in the DL.I am getting the exception like this:
The server rejected one or more recipient addresses.

code in 1.1

Dim mail As New MailMessage()
mail.To = "abc_DL@one.com"
mail.From = "strust@one.com"
mail.Subject = "This is test mail"
SmtpMail.SmtpServer = "smtp.one.com"
SmtpMail.Send(mail)


但是在我低于2.0应用程序的示例代码中,即使有错误的地址(junkmail@one.com)以及提到的DL,我也能够将电子邮件发送给具有正确地址的收件人

代码2.0
使用的命名空间


But in my sample code below 2.0 application i am able to send the email to the recipients with correct address even if there is wrong address(junkmail@one.com)along with the DL mentioned

code 2.0
Namespace used

Imports System.Net.Mail

Dim mail As New MailMessage()
mail.[To].Add(abc_DL@one.com,junkmail@one.com)
mail.From = New MailAddress(strust@one.com)
mail.Subject =This is test mail to the distribution List
mail.Body = This is a test mail.Please ignore
Dim smtp As New SmtpClient(smtp.one.com)
smtp.Send(mail)


谢谢,
Priya


Thanks,
Priya

推荐答案

您确定未发送吗?邮件服务器可以发回邮件退回的报告,但是对于邮件类别来说,这很奇怪,并且可以在发送后得到它,因此您的邮件应该已经发送了,都一样.

如果.NET 1.1邮件类中存在问题,那么也许您需要获取列表,然后将邮件发送给每个人?我认为存在任何问题,因为这是内部邮件服务器,其行为异常.
Are you sure it is not sent ? A mail server can send back a report that a mail bounced, but it''s very odd for the mail class to be able to notice, and it gets it AFTER it was sent, so your mail should have been sent, all the same.

If there''s an issue in the .NET 1.1 mail classes, then perhaps you need to get your list, and send a mail to each person ? I assume any issue exists because this is an internal mail server that behaves strangely.


这篇关于使用asp.net 1.1中的通讯组列表(DL)发送电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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