بسم الله الرحمن الرحيم
الاخوة الاعزاء / حاولت في عمل email بطريقتين وكانت هذه الاخطاء
// Create the message. MailMessage mailNew = new MailMessage(); // Set the message properties. mailNew.From = "someone@microsoft.com"; mailNew.To = "jesse@contoso.com"; mailNew.Subject = "This is the subject text."; mailNew.Body = "This is the message text."; SmtpMail.Send(mailNew); وكان هذا الخطأ Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Runtime.InteropServices.COMException: قيمة تكوين "الارسال باستخدام" غير صالحة.
اما الطريقة الثانية
<%@ Import Namespace="System.Web.Mail" %> <script runat="Server"> Sub Button_Click( s As Object, e As EventArgs ) SmtpMail.Send( _ mailfrom.Text, _ mailto.Text, _ mailsubject.Text, _ mailbody.Text ) End Sub </Script> <html> <head><title>SendMail.aspx</title></head> <body> <h1>Send Mail:</h1> <form runat="Server" ID="Form1"> <b>From:</b> <br> <asp:TextBox ID="mailfrom" Columns="50" Runat="Server" /> <p> <b>To:</b> <br> <asp:TextBox ID="mailto" Columns="50" Runat="Server" /> <p> <b>Subject:</b> <br> <asp:TextBox ID="mailsubject" Columns="50" Runat="Server" /> <p> <b>Body:</b> <br> <asp:TextBox ID="mailbody" TextMode="Multiline" Columns="50" Rows="10" Runat="Server" /> <p> <asp:Button Text="Send!" OnClick="Button_Click" Runat="Server" ID="Button1"/> </form> </body> </html> وكان الخطأ Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: CS1026: ) expected
ثم وجدت في احد الكتب عندما كان يشرح طريقة عمل EMAIL كان يشتغل على IIS من SQL SERVER 2000 ولكن لا اعرف من اين جاء بها بالتحديد
ارجوا المساعدة في هذه المشكلة
ولكم جزيل الشكر