Sending E-Mail. Microsoft SMTP Service Simple Mail Transport Protocol Does not support the Post...
-
Upload
loreen-mcdonald -
Category
Documents
-
view
212 -
download
0
Transcript of Sending E-Mail. Microsoft SMTP Service Simple Mail Transport Protocol Does not support the Post...
![Page 1: Sending E-Mail. Microsoft SMTP Service Simple Mail Transport Protocol Does not support the Post Office Protocol (POP) InetPub\MailRoot\Pickup InetPub\MailRoot\Drop.](https://reader036.fdocuments.in/reader036/viewer/2022080914/56649f575503460f94c7b60e/html5/thumbnails/1.jpg)
Sending E-MailSending E-Mail
![Page 2: Sending E-Mail. Microsoft SMTP Service Simple Mail Transport Protocol Does not support the Post Office Protocol (POP) InetPub\MailRoot\Pickup InetPub\MailRoot\Drop.](https://reader036.fdocuments.in/reader036/viewer/2022080914/56649f575503460f94c7b60e/html5/thumbnails/2.jpg)
Microsoft SMTP ServiceMicrosoft SMTP Service
Simple Mail Transport Protocol
Does not support the Post Office Protocol (POP)
InetPub\MailRoot\Pickup
InetPub\MailRoot\Drop
Send e-mail
receive e-mail
![Page 3: Sending E-Mail. Microsoft SMTP Service Simple Mail Transport Protocol Does not support the Post Office Protocol (POP) InetPub\MailRoot\Pickup InetPub\MailRoot\Drop.](https://reader036.fdocuments.in/reader036/viewer/2022080914/56649f575503460f94c7b60e/html5/thumbnails/3.jpg)
Sending a Simple E-Mail Sending a Simple E-Mail MessageMessage
<%@ 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>
![Page 4: Sending E-Mail. Microsoft SMTP Service Simple Mail Transport Protocol Does not support the Post Office Protocol (POP) InetPub\MailRoot\Pickup InetPub\MailRoot\Drop.](https://reader036.fdocuments.in/reader036/viewer/2022080914/56649f575503460f94c7b60e/html5/thumbnails/4.jpg)
Sending a Simple E-Mail Sending a Simple E-Mail MessageMessage
<html><head><title>SendMail.aspx</title></head><body>
<h1>Send Mail:</h1><form runat="Server">
<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" /></form></body></html>
![Page 5: Sending E-Mail. Microsoft SMTP Service Simple Mail Transport Protocol Does not support the Post Office Protocol (POP) InetPub\MailRoot\Pickup InetPub\MailRoot\Drop.](https://reader036.fdocuments.in/reader036/viewer/2022080914/56649f575503460f94c7b60e/html5/thumbnails/5.jpg)
Adding AttachmentsAdding Attachments<%@ Import Namespace="System.Web.Mail" %><%Dim objMailMessage As MailMessageDim objMailAttachment As MailAttachment
' Create the Mail AttachmentobjMailAttachment = New MailAttachment( "c:\BizPlan.doc" )
' Create the Mail MessageobjMailMessage = New MailMessageobjMailMessage.From = "[email protected]"objMailMessage.To = "[email protected]"objMailMessage.Subject = "Secret Business Plan"objMailMessage.Body = "Here's the plan (don't show it to anyone!)"objMailMessage.Attachments.Add( objMailAttachment )
' Send the Mail MessageSmtpMail.Send( objMailMessage )%>
BizPlan Sent!
![Page 6: Sending E-Mail. Microsoft SMTP Service Simple Mail Transport Protocol Does not support the Post Office Protocol (POP) InetPub\MailRoot\Pickup InetPub\MailRoot\Drop.](https://reader036.fdocuments.in/reader036/viewer/2022080914/56649f575503460f94c7b60e/html5/thumbnails/6.jpg)
Sending HTML E-MailSending HTML E-Mail<%@ Import Namespace="System.Web.Mail" %><%Dim objMailMessage As MailMessageDim strHTMLBody As String' Create the HTML Message BodystrHTMLBody = "<html><head>" & _ "<title>Thank You!</title>" & _ "</head><body bgcolor=lightblue>" & _ "<font face=Script size=6>" & _ "Thank you for registering!" & _ "</font></body></html>"' Create the Mail MessageobjMailMessage = New MailMessageobjMailMessage.From = "[email protected]"objMailMessage.To = "[email protected]"objMailMessage.Subject = "Thanks for Registering!"objMailMessage.Body = strHTMLBodyobjMailMessage.BodyFormat = MailFormat.HTML' Send the Mail MessageSmtpMail.Send( objMailMessage )%>HTML Email Sent!