The button ID i need to configure is the btnEmail. I searched all over teh internet and so far i havnt found a code that work coz i need a working email form for my website.
Is there anything that will help us if we view your source code?
You said that you haven't done any coding.
Better Google around a little on how to send mail and then if you have problems sending your mail post your questions.
Ah, also post your web.config section that you fixed for your mail....An while on it post also your login credentials your credit card number and you password on every site you are currently member(i hope you don't do it) ....
I've uploaded my email project so if you guys found a solution you may add code but please can you comment the areas on where you have written the code you have provided me?
As mentioned before i need to configure the Email Daora D button.
Yes , well i don't think anyone will give you the code, at least on this forum.You have to tell us what you are trying and what code you use.
I also asked for your web config(along with the other) section that you configure your email to see if you have done it right.Let's start from that but personally am going to bed so if no one has answered i'll take a look tomorrow.
Yes , well i don't think anyone will give you the code, at least on this forum.You have to tell us what you are trying and what code you use.
I also asked for your web config(along with the other) section that you configure your email to see if you have done it right.Let's start from that but personally am going to bed so if no one has answered i'll take a look tomorrow.
have you checked out my web.config file in the app i uploaded?
Yes, i would advise not to put your username and password in web.config.You can create a class that will send mails and put your credentials there for safer access or encrypt the web.config but i haven;t tried on the mail namespace.
Now as i've said you have to create a class to send your emails.What have you found and tried googling around and do you have any problems?
P.S. for future reference post your code in the forum.It's tiresome to go back and forth looking at your zip.
Last edited by sapator; May 11th, 2012 at 11:33 PM.
Yes, i would advise not to put your username and password in web.config.You can create a class that will send mails and put your credentials there for safer access or encrypt the web.config but i haven;t tried on the mail namespace.
Now as i've said you have to create a class to send your emails.What have you found and tried googling around and do you have any problems?
P.S. for future reference post your code in the forum.It's tiresome to go back and forth looking at your zip.
Cheers for the advise.......umm in the web config file is it best to comment the details? I appoligise if i did it wrong after i am new here
Hi everyone i tried this code but i keep getting blue underlines on the Dim mm as New MailMessage and Dim smtp as New smtpclient
Code:
Protected Sub btnEmail_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnEmail.Click
'!!! UPDATE THIS VALUE TO YOUR EMAIL ADDRESS
Const ToAddress As String = "ramiabbas@daora-d.com"
'(1) Create the MailMessage instance
Dim mm As New MailMessage(UsersEmail.Text, ToAddress)
'(2) Assign the MailMessage's properties
mm.Subject = txtSubject.Text
mm.Message = txtName.Text
mm.IsMessageHtml = False
'(3) Create the SmtpClient object
Dim smtp As New Smtp
'(4) Send the MailMessage (will use the Web.config settings)
smtp.Send(mm)
End Sub
thats the code i tried for my email button but when i run it Visual Studio says i have errors.
I inserted it on top but i'm still getting blue under-lines.
is this right?
Code:
Imports System.Net.Mail
Partial Class _Default
Inherits System.Web.UI.Page
Protected Sub btnClear_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnClear.Click
Server.Transfer("Default.aspx")
End Sub
Protected Sub btnEmail_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnEmail.Click
'!!! UPDATE THIS VALUE TO YOUR EMAIL ADDRESS
Const ToAddress As String = "ramiabbas@daora-d.com"
'(1) Create the MailMessage instance
Dim mm As New MailMessage (Underline Useremail)--->(UsersEmail.Text, ToAddress)
'(2) Assign the MailMessage's properties
mm.Subject = txtSubject.Text
(Underline)---> mm.Message = txtName.Text
(Underline)---> mm.IsMessageHtml = False
'(3) Create the SmtpClient object
Dim SMTP As New SmtpClient
'(4) Send the MailMessage (will use the Web.config settings)
SMTP.Send(mm)
End Sub
End Class
I've pointed out the errors im getting
Last edited by Daora-D; May 12th, 2012 at 09:10 PM.
Hi.It appears that we have a serious problem here if you don't know how to use import.What you have shown here is that you just copy pasted the code and expect us to fix it for you.As i've said you have to study and test first.I also suggest some basic vb.net lessons from an eBook because it appears that you cannot even grasp the basics.
Please first take your time and read the vb.net coding basics and then deal with this page.
I'm talking like JMC here but i'm afraid that even if i fix your code then you will stuck on the very next piece of coding.I prefer not to do that in order to push you to learn rather than copy-paste.I will be happy to answer any questions that shows effort and basic understanding of the language you use.
Cheers.
P.S. You can put your mouse on the blue lines and see what is the error problem.
Hi.It appears that we have a serious problem here if you don't know how to use import.What you have shown here is that you just copy pasted the code and expect us to fix it for you.As i've said you have to study and test first.I also suggest some basic vb.net lessons from an eBook because it appears that you cannot even grasp the basics.
Please first take your time and read the vb.net coding basics and then deal with this page.
I'm talking like JMC here but i'm afraid that even if i fix your code then you will stuck on the very next piece of coding.I prefer not to do that in order to push you to learn rather than copy-paste.I will be happy to answer any questions that shows effort and basic understanding of the language you use.
Cheers.
P.S. You can put your mouse on the blue lines and see what is the error problem.
I only just started learning ASP.NET in my college, diploma is the next level....but at the same time i'm trying to teach myself how to code my designs.