473,397 Members | 2,068 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

error on contact form

hello , i am getting this error message "At least one of the From or Sender fields is required, and neither was found."

i have added a contact form all the details are correct as far as i no please can someone check over them and help me fix this this is the web address to the page where the error is

http://www.onlinegamesleague.co.uk/j...o/contact.aspx

this is my source code

Expand|Select|Wrap|Line Numbers
  1. <%@ Page Title="Jake Hathaway's Portfolio l Contact Me"  MasterPageFile="MasterPage.master"
  2.     AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default"  %>
  3.      <% @Import Namespace="System.Web.Mail" %>
  4.  
  5. <asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
  6.     <link rel="stylesheet" href="css/global.css">
  7.         <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
  8.  
  9. <script language="vb" runat="server">
  10.     Sub btnSendFeedback_Click(ByVal sender As Object, ByVal e As EventArgs)
  11.  
  12.         'Create an instance of the MailMessage class
  13.         Dim objMM As New MailMessage()
  14.  
  15.         'Set the properties - send the email to the person who filled out the
  16.         'feedback form.
  17.         objMM.To = "hathawayjake5@googlemail.com"
  18.         objMM.From = txtEmail.Text
  19.  
  20.         'If you want to CC this email to someone else, uncomment the line below
  21.         'objMM.Cc = "someone@someaddress.com"
  22.  
  23.         'If you want to BCC this email to someone else, uncomment the line below
  24.         'objMM.Bcc = "someone@someaddress.com"
  25.  
  26.         'Send the email in text format
  27.         objMM.BodyFormat = MailFormat.Text
  28.         '(to send HTML format, change MailFormat.Text to MailFormat.Html)
  29.  
  30.         'Set the priority - options are High, Low, and Normal
  31.         objMM.Priority = MailPriority.Normal
  32.  
  33.         'Set the subject
  34.         objMM.Subject = "4GuysFromRolla.com - Feedback"
  35.  
  36.         'Set the body
  37.         objMM.Body = "At " + DateTime.Now + " feedback was sent from an ASP.NET " & _
  38.                      "Web page.  Below you will find the feedback message " & _
  39.                      "send by " & txtName.Text & "." & vbCrLf & vbCrLf & _
  40.                      "---------------------------------------" & vbCrLf & vbCrLf & _
  41.                      txtMessage.Text & vbCrLf
  42.  
  43.  
  44.         'Specify to use the default Smtp Server
  45.         SmtpMail.SmtpServer = "smtp.gmail.com"
  46.  
  47.         'Now, to send the message, use the Send method of the SmtpMail class
  48.         SmtpMail.Send(objMM)
  49.  
  50.  
  51.         panelSendEmail.Visible = False
  52.         panelMailSent.Visible = True
  53.     End Sub
  54.  
  55.  
  56. </script>
  57.  
  58. </asp:Content>
  59.  
  60. <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
  61. <div class="contactback"><div class="contactdetailstext"><span style="font-family:Verdana;">Contact Details:</span></div><div class="contactdetailstext2"><span style=" font-weight:bold;">Address:</span><br />44 st mellion crescent<br />wrexham<br />ll13 9gz<br /><br /><span style="font-weight:bold;">Mobile:</span> 07824322300<br /><br /><span style="font-weight:bold;">Email Address:</span><br /><a href="mailto:hathawayjake5@googlemail.com?subject=website"> hathawayjake5@googlemail.com</a><br /><br /><span style="font-weight:bold;"><a href="">Facebook</a><br /><a href="">Twitter</a></span></div></div>
  62. <asp:panel id="panelSendEmail" runat="server">
  63.     <form id="Form1" runat="server">
  64.       <h2>We are interested in your feedback!  Please enter the following
  65.       requested information below to send us your comments.</h2>
  66.  
  67.       <b>Your Name:</b>
  68.       <asp:textbox id="txtName" runat="server" />
  69.       <br>
  70.  
  71.       <b>Your Email Address:</b>
  72.       <asp:textbox id="txtEmail" runat="server" />
  73.       <p>
  74.  
  75.       <b>Your Message:</b><br>
  76.       <asp:textbox id="txtMessage" TextMode="MultiLine"
  77.                       Columns="40" Rows="10" runat="server" />
  78.       <p>
  79.  
  80.       <asp:button runat="server" id="btnSendFeedback" Text="Send Feedback!"
  81.                   OnClick="btnSendFeedback_Click" />
  82.     </form>
  83.   </asp:panel>
  84.  
  85.  
  86.   <asp:panel id="panelMailSent" Visible="False" runat="server">
  87.     An email has been sent to the email address you specified.  Thanks!
  88.   </asp:panel>
  89. </asp:Content>
please help me to solve this problem as soon as possible

thanks in advance :)
Mar 19 '11 #1
0 1384

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: Pat Mahoney | last post by:
For some reason I am unable to access documents in Javascript. eg - tried to register on a site, and when clicked on register, blank screen came up with this address: ...
4
by: Larry | last post by:
Hi All, How I can open a new web page in a web form? I know response.redirect("...aspx") will re-direct the current page to another. However, what I want is to remain the current page unchange...
2
blyxx86
by: blyxx86 | last post by:
I am very new to Access, and have only been using it for a month now. I have learned how to do a lot of things, but have been having problems making a form update a query that then is sent to a...
0
by: kammaldeep | last post by:
hi, i m newbie 2 PHP & to b frank ... will alwaz be ... i dont think i will go into much details with PHP as my work doesnot include workin with PHP bt i have a forum .. and i want to make a...
5
by: johnlim20088 | last post by:
Hi SOMEONE PLEASE HELP ME I have a vb net program to call localhost http://localhost/hi.aspx, my page work FINE when I browse it, but when I call it through vb net program it return error ...
0
by: asad56 | last post by:
I am workin with a superstore managment project. I connect Access database with main form . Then it work properly. But now I connect same database with another table or field in another form which is...
0
by: nabil035 | last post by:
I have a C++ solution in Visual Studio 2008 This solution contains two projects: 1- Native DLL that communicate with others delegates and provides interfaces to the second project 2-Managed C++...
1
by: deiku | last post by:
I get a lot of spam recently and I think is from my contact page... how do I encode my email address so that It won't be picked up by spam bots?
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.