在vb2005中使用SMTP服务器发送电子邮件 [英] sending email using SMTP server Email in vb2005
问题描述
如何解决以下错误
{超出存储空间分配。服务器响应为:2cAn1m01L2s05DV01 :: auth ::消息会使帐户超过每日配额。}
作为我发送电子邮件的代码:
how to solve following Error
{"Exceeded storage allocation. The server response was: 2cAn1m01L2s05DV01 :: auth :: Message would bring account over daily quota."}
as my code to sent email as :
mailMsg.Subject = strSubject
mailMsg.Body = strMailMsg
mailMsg.IsBodyHtml = True
mailMsg.DeliveryNotificationOptions = DeliveryNotificationOptions.OnFailure
If Trim(strReplyTo).Length > 0 Then
mailMsg.Headers.Add("Reply-To", strReplyTo)
End If
mailMsg.Headers.Add("X-Organization", strCompanyName)
If Trim(strReplyTo).Length > 0 Then
mailMsg.ReplyTo = New MailAddress(strReplyTo)
End If
SmtpServer.Send(mailMsg)
fnSendEmail = True
Catch ex As System.Net.Mail.SmtpException
gboolsmtp = True
GoTo nextsmtp
Catch ex As Exception
Me.Cursor = Cursors.Default
MessageBox.Show(ex.Message, me.text, MessageBoxButtons.OK, MessageBoxIcon.Error)
' StoreErrorLog(Me.Text, ex.Message, ex.StackTrace)
End Try
推荐答案
消息会带来帐号结束每日配额
Message would bring account over daily quota
获取更大配额的邮箱。
这是获得错误并在不了解错误本身的情况下得出结论的主要示例。花时间阅读错误可以直接指出问题(超过每日配额),并帮助您意识到问题出在您的SMTP提供商而不是您的代码上。
75%的调试是理解为什么会发生的事情,另外25%的人正在理解如何修复它。为什么会花一点时间来节省你的时间。
[/编辑]
Get a mailbox with a bigger quota.
Here's a prime example of getting an error and jumping to a conclusion without understanding the error itself. Taking the time to read the error can point you directly to the problem (over daily quota), and would help you realize that the issue is with your SMTP provider and not your code.
75% of debugging is understanding why something is happening, the other 25% is understanding how to fix it. A little effort in the why will save you hours in the how.
[/Edit]
你必须等待一个一天!
消息说明你已经超过了你的每日配额。
You have to wait a day!
The message states that you are going over your daily quota.
这篇关于在vb2005中使用SMTP服务器发送电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!