Connecting to Access Database

innovative14

Newcomer
Joined
Apr 21, 2004
Messages
3
I have a webform with a checkbox list and a radiobuttonlist and few text boxxes. i want to connect to a access database.how can i do that.i know its easy but i am confused .i am new to the .net programming.

also i want to send automated email whenever anybody submits the form.i used the following code for sending the mail using the smtp server.but the mails are not delivered.the code is


'Create an instance of the MailMessage class
Dim objMM as New MailMessage()

'Set the properties
objMM.To = "someone@someaddress.com"
objMM.From = "someoneelse@someotheraddress.com"

'If you want to CC this email to someone else...
objMM.Cc = "someone2@someaddress.com"

If you want to BCC this email to someone else...
objMM.Bcc = "someoneElse@someaddress.com"

'Send the email in text format
objMM.BodyFormat = MailFormat.Text
'(to send HTML format, change MailFormat.Text to MailFormat.Html)

'Set the priority - options are High, Low, and Normal
objMM.Priority = MailPriority.Normal

'Set the subject
objMM.Subject = "Hello there!"

'Set the body - use VbCrLf to insert a carriage return
objMM.Body = "Hi!" & vbCrLf & vbCrLf & "How are you doing?"


SmtpMail.SmtpServer = ""
SmtpMail.Send(objMM)


Can anybody tell me the problem with that....

Thanks
 
Do you have a smtp server running on the local domain or on your machine?
When you don´t specify the smtp server address it will look for your default server.
Do you get any error message?
 
sending mail

hi,

i dont get any error when i implement that code .the message is not mailed to the destination email id.

i am running on local smtp server.do i need to make any changes in the smtp server to send mails.

please let me know the solution..

thanks

Cassio said:
Do you have a smtp server running on the local domain or on your machine?
When you don´t specify the smtp server address it will look for your default server.
Do you get any error message?
 
Back
Top