Hello,
Can you help me out in making this work? What I want is as simple as sending
form values to an email.
The code I am using is the following:
<Script runat="server">
Private Sub Page_Load()
Dim msg As EmailMessage = New EmailMessage("l ocalhost")
Dim msgTo, msgFrom, msgName, msgSubject, msgMessage
msgTo = Request.Form("t o")
msgFrom = Request.Form("f rom")
msgName = Request.Form("n ame")
msgSubject = Request.Form("s ubject")
msgMessage = Request.Form("m essage")
' Set the email type
msg.BodyFormat = MailFormat.Html
' Set the from address
msg.FromAddress = msgFrom
' Set the to address
msg.To = msgTo
' Set the from name
msg.FromName = msgFrom
' Set the email subject
msg.Subject = msgSubject
' Set the email message
msg.Body = "<html><head><s tyle type='text/css'>body {font-family:
Verdana, Arial, Helvetica, sans-serif; font-size: 11px;color: #333333;
background-color: </style></head><body>" &_
"<strong>Ne w Message</strong>" &_
"<br><strong>Fr om: </strong>" & msgFrom &_
"<br><strong>Na me: </strong>" & msgName &_
"<br><strong>To : </strong>" & msgTo &_
"<br><strong>Su bject: </strong>" & msgSubject &_
"<br><strong>Me ssage Text</strong>" &_
"<br> " & msgMessageField &_
"</body></html>"
' Internal Exceptions
msg.ThrowExcept ion = False
' Logging and LogBody
msg.Logging=fal se
msg.LogBody = false
' Sends Message
If msg.Send() Then
' Redirects to error page
Response.Redire ct("status.aspx ?result=contact Err")
Else
' Redirects to confirmed page
Response.Redire ct("status.aspx ?result=contact Ok")
End If
End Sub
</script>
I really would appreciate if you could send me a working example using my
code. I am trying to make it work for 1 week and until now I had no luck.
The form has 5 text inputs: to, from, name, subject and message AND a button
which when pressed should send the form values in the email.
I tryied to comment everything I could think of. I am working in ASP.net /
VB.
Thank You Very Much,
Miguel Moura 1 1067
Hi Miguel,
What is it you want to archieve, because with sending email there are a lot
of possibilities which are not always clear when you start with it the first
time, to name some:
- you can use an SMTP webserver which sends mails for the user (that is
what you are doing now), but not using his own mailclient but that
mailserver. That mailserver can be everywhere however the ISP should allows
that (You can think by this on spammail situation where this is ideal for).
- you can do the same but using your Exchange server.
- you can use the office outlook client.
- you can send a standard client webmail using outlookexpress, outlook
office, lotus mail or whatever mailclient (not with attachments)
- ......... more situations
Some information about this will help you giving you not the wrong
information?
Cor This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Kassam |
last post by:
Hi MVPs out there.
I have constructed an order form and the users will enter the informtion. I
now need to send the filled out form as an e-mail (body being the HTML with
the fille din data) to a predefined e-mail address. I know how to use CDO. I
don't want to go to another page to recontruct the HTML as the '.body'
Thank you in...
|
by: varun |
last post by:
hello friends,
i have been developing an application in asp.net.
i want to inherit a web page on all other web pages of
my application.
i took a form and callded it mybaseform1.
then i took another form, say webform1, and tried to
|
by: Miguel Dias Moura |
last post by:
Hello,
Can you help me out in making this work? What I want is as simple as sending
form values to an email.
The code I am using is the following:
|
by: Miguel Dias Moura |
last post by:
Hello,
i have an ASP.net / VB page with a Script (submitValues) and a Form.
1. The form has 20 input texts and a "Submit" button.
2. The script declares 20 variables. The value of each variable is taken
from each of the 20 input texts.
3. When the button "Submit" is click the variable values are sent to an
email address using AspNetEmail.
|
by: Sandy |
last post by:
Hello -
I want to be able to send an email from my app that contains the logo from
my website at the top of it. I have searched the web and there are many
components out there, but isn't there an easier way? My logo is quite simple.
Any help will be greatly appreciated!
--
Sandy
| |
by: Miguel Dias Moura |
last post by:
Hello,
Can you help me out in making this work? What I want is as simple as sending
form values to an email.
The code I am using is the following:
|
by: Miguel Dias Moura |
last post by:
Hello,
i have an ASP.net / VB page with a Script (submitValues) and a Form.
1. The form has 10 input text and a "Submit" button.
2. The script declares 10 variables. The value of each variable is taken
from each of the 10 input texts.
3. When the button "Submit" is click the variable values are sent to an
email address using AspNetEmail.
|
by: YMPN |
last post by:
Hi Everyone,
I'm deen from Riyadh.
Please do help me with some problem i have. I have this formview
control setup to recieved inputs from user (textbox, dropdownlist,
others).
After inserting, I want to send the data via email, the problem is how
do I do that?
|
by: chaitanya02 |
last post by:
Hi All,
Well- this question might have appeared several times on this forum- but would appreciate your reply on this:
I have a asp page, where customers login with some username and the pwd, which are stored in sql. i should be using this user name and pwd and check if it is the same as the userid and the pwd in the sql 4 table..IF so then:...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |