موضوع مشکل ارسال اطلاعات فرم به ایمیل,.
ASP.NET, برنامه نویس, برنامه نویسیتاريخ ارسال:2014/07/13
هاست سنتر سلام من کد ارسال ایمیل رو نوشتم ولی با زدن باتن هیچ عملی انجام نمیشه اگه کسی میتونه کمکم کنهif(Page.IsValid) { try { string strBody = string.Empty; strBody += string.Format("<b>Full name </b>: {0} <br />", Txt_user.Text ); strBody += string.Format("<b>E-Mail </b>: <a href='mailto:{0}'> {0} </a> <br />", txt_Email.Text ); strBody += string.Format("<b>Time </b>: {0} <br />", txt_tahvil.Text ); strBody += string.Format("<b>Description </b>: {0} <br />", txt_text.Text.Replace("\n" , "<br />") ); System.Net.Mail.MailMessage oMailMessage = new System.Net.Mail.MailMessage(); System.Net.Mail.MailAddress oMailaddress = null; oMailaddress= new System.Net.Mail.MailAddress ( "oojaghlou.k@gmail.com", "Auto Response Email Sender", System.Text.Encoding.UTF8 ); oMailMessage.From = oMailaddress; oMailMessage.Sender = oMailaddress; oMailMessage.To.Clear(); oMailMessage.CC.Clear(); oMailMessage.Bcc.Clear(); oMailMessage.ReplyToList.Clear(); oMailMessage.Attachments.Clear(); //میتونیم شخص دیگری را به غیر از خودمان مشخص کنیم که ایمیل را دریافت کند مثل خود شخص //oMailMessage.ReplyToList.Add(oMailaddress); //oMailaddress = // new System.Net.Mail.MailAddress // ( // txt_Email.Text, // Txt_user.Text, // System.Text.Encoding.UTF8 // ); // oMailMessage.To.Add(oMailaddress); oMailMessage.BodyEncoding = System.Text.Encoding.UTF8; oMailMessage.Body = strBody; oMailMessage.SubjectEncoding = System.Text.Encoding.UTF8; oMailMessage.Subject = "[-<Type star>-] - " + txt_tel.Text; oMailMessage.IsBodyHtml=true; oMailMessage.Priority = System.Net.Mail.MailPriority.Normal; oMailMessage.DeliveryNotificationOptions = System.Net.Mail.DeliveryNotificationOptions.OnSucc ess; string strRootRelativePathName = "~/img/"; string strPathName = Server.MapPath(strRootRelativePathName); if(System.IO.File.Exists(strPathName)) { System.Net.Mail.Attachment oAttachment = new System.Net.Mail.Attachment(strPathName); ... هاست,دامین,سایت,وب,طراحی
میزبانی وب ,هاست,فضای وب,ویندوز,لینوکس,دات نت,پی اچ پی,web hosting,windows host,linux host,asp.net,php,sql server,mysql میزبان پایتخت ارائه دهنده خدمات میزبانی وب، هاست و هاستینگ، میزبانی هاست، دامین، میزبانی نمایندگی، نمایندگی وب، سرور مجازی و سرور مجازی ابری می باشد.هاست,میزبانی وب,دامین,سرور مجازی,میزبان پایتخت,host,domain,vps,mizban paytakht,hosting,share hosting,میزبان وب,میزبانی هاست,هاستینگ
google