Logo 
Search:

Asp.net Answers

Ask Question   UnAnswered
Home » Forum » Asp.net       RSS Feeds
  Question Asked By: Hayrah Burki   on Jul 15 In Asp.net Category.

  
Question Answered By: Jo Fowler   on Jul 15


<%@ Page language="VB" AutoEventWireup="false"
aspcompat=true%>
<%@ import namespace='system.data.oledb' %>
<%@ import namespace='system.data' %>
<%@ import namespace='System.Web.Mail' %>
<script language="VB" runat="server">

Sub Add(sender as Object, e as System.EventArgs)

dim Mailer as new MailMessage

If request.form("EmailAddress") <>""""

Mailer.To="francisxavaz@..."

mailer.BodyFormat = MailFormat.Html

Mailer.Bcc = "francisxvaz@..."

Mailer.Subject = "Testing!!!!!!!!"

Mailer.From="sakthivel.atwpdc.com"

Mailer.Body = "hi"

Smtpmail.SmtpServer = "80.0.0.54"

Smtpmail.Send(mailer)

End If

End Sub


SmtpMail.Send(Mailer)

if Mailer.SendMail then

response.write ("Mail Was Sent")

else

response.write ("Sendmail failed."&
Mailer.response)

end if



response.write("<br><br><font size=3
color=red>sent to day</font><br>")

response.write("<br>"& name)

response.write("<br>")

response.write(""& messagebody)

</script>
<html>
<body>
<form runat='server' ID="Form1">
<b>Enter Name
<br>
<asp:textbox id='name' runat='server' /><br>
Enter Email</b>
<br>
<asp:textbox id='email' runat='server' /><br>
Enter Message<b><br>
<asp:textbox id='message' runat='server' /><br>
How long till first send?</b>
<br>
<asp:textbox id='firstsend' runat='server' /><br>
Then how often?</b>
<br>
<asp:textbox id='frequency' runat='server' />
<asp:linkbutton id='button1' runat='server'
Text='Add' onfiltered='Add' />
</form>
</body>
</hmtl>

Share: 

 

This Question has 9 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Question about how to send mail using Asp.net Or get search suggestion and latest updates.


Tagged: