Parsi Coders
سورس کد فرستادن ایمیل (Asp.Net) - نسخه قابل چاپ

+- Parsi Coders (http://parsicoders.com)
+-- انجمن: Web Development and Design (http://parsicoders.com/forumdisplay.php?fid=47)
+--- انجمن: ASP, ASP.NET (http://parsicoders.com/forumdisplay.php?fid=49)
+--- موضوع: سورس کد فرستادن ایمیل (Asp.Net) (/showthread.php?tid=2443)



سورس کد فرستادن ایمیل (Asp.Net) - Amin_Mansouri - 06-17-2012

کد:
Send an email<%@Page Explicit="False" Language="VB" Debug="True" %>
<%@Import Namespace="System.Web.Mail" %>
<%
Dim EmailTo As String = "test@test.com"
Dim EmailFrom As String = "myemail@myemail.com"
Dim EmailSubject As String = "Sample Email"
Dim EmailBody As String = "Test email"
System.Web.Mail.SmtpMail.Send(EmailFrom, EmailTo, EmailSubject, EmailBody)
Response.Write ("Mail sent OK.")%>