当我使用UserNameB登录到Windows 7计算机时,我在尝试发送电子邮件时收到此错误:
Unhandled Exception: System.Net.Mail.SmtpFailedRecipientException: Mailbox unava
ilable. The server response was: 5.7.1 Unable to relay
at eFormsSystem.MainSystem.DoIt() in C:\Documents and Settings\...\Deskto
p\eFormsSystem\eFormsSystem\MainSystem.cs:line 63
at eFormsApp.Program.Main(String[] args) in C:\Documents and Settings\...
\Desktop\eFormsSystem\eFormsApp\Program.cs:line 12
当我使用UsernameA登录xp机器时,我没有收到错误。
我在配置文件中使用此配置:
<normal deliveryMethod="Network" from="UserNameB@domain.com" >
<network host="mail.domain.com" defaultCredentials="false"
userName="someusername@domain.com" password="password" />
这是我发送电子邮件的方式:
if (processInfo.sendEmail)
{
OutlookeMail outlookEmail = new OutlookeMail(GetSmtpSection(eEmailType.normal));
OutlookComponent component = new OutlookComponent();
component.fullPath = rename;
if (debugEmail)
component.emailTo = debugEmailAddress;
else
component.emailTo = processInfo.Email;
component.emailfrom = "UserNameC@Millenniumlabs.com";
component.subject = formType + " - " + processInfo.PracitceName;
outlookEmail.SendEmailWithAttachment(component);
}
我不确定这些信息是否足以确定问题所在,但请向我提出更多问题以帮助解决此问题。
问题:为什么我在一个用户名上收到此错误但在另一个用户名上却没有?