Hi
i am getting the following error , i have added the authentication tag
also, but still it causing error , is there any other alternative
method to send mail
Exception Details: System.Runtime.InteropServices.COMException: The
server rejected one or more recipient addresses. The server response
was: 503 This mail server requires authentication. Please check your
mail client settings.
<% @Import Namespace="System.Web.Mail" %>
<script language="vb" runat="server">
Sub btnSendFeedback_Click(sender as Object, e as EventArgs)
'Create an instance of the MailMessage class
Dim objMM as New MailMessage()
'Set the properties - send the email to the person who filled out the
'feedback form.
objMM.To = "[EMAIL PROTECTED]"
'objMM.From = txtEmail.Text
objMM.From = "[EMAIL PROTECTED]"
objMM.BodyFormat = MailFormat.Text
objMM.Priority = MailPriority.Normal
'Set the subject
objMM.Subject = "Feedback"
'Set the body
objMM.Body = "message body"
objMM.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate",
"1") 'basic authentication
objMM.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername",
"iusername") 'set your username here
objMM.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword",
"pwd") 'set your password here
SmtpMail.SmtpServer = "mail.server.com"
'Now, to send the message, use the Send method of the SmtpMail class
SmtpMail.Send(objMM)
panelSendEmail.Visible = false
panelMailSent.Visible = true
End Sub
</script>
<html>
<body>
<asp:panel id="panelSendEmail" runat="server">
<form runat="server">
<h2>We are interested in your feedback! Please enter the following
requested information below to send us your comments.</h2>
<b>Your Name:</b>
<asp:textbox id="txtName" runat="server" />
<br>
<b>Your Email Address:</b>
<asp:textbox id="txtEmail" runat="server" />
<p>
<b>Your Message:</b><br>
<asp:textbox id="txtMessage" TextMode="MultiLine"
Columns="40" Rows="10" runat="server" />
<p>
<asp:button runat="server" id="btnSendFeedback" Text="Send Feedback!"
OnClick="btnSendFeedback_Click" />
</form>
</asp:panel>
<asp:panel id="panelMailSent" runat="server" Visible="False">
An email has been sent to the email address you specified. Thanks!
</asp:panel>
</body>
</html>
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/