Hello,
I am new to coding in vb.net and have run into an issue with some code
that I am looking over. This is a webform that is filled out and once
it is filled out, it takes the responses from the form and appends it
to an email which it then sends out to one specific user (for testing
purposes, it's sending to me). My problem is that the code somehow is
sending two identical emails to me. I am almost certain that the code
looks ok, and I have other applications written in vbscript that sends
to the same relay server and only sends out one email. Can anyone else
see why this might be happening?
Thanks in advance,
Sheel Shah
Society of Actuaries
Dim emailfrom As String = ""
Dim emailto As String = ""
Dim emailcc As String = ""
Dim emailsubject As String = ""
Dim attachmentfile As String = ""
Dim is_attached As Boolean = True
Dim save_filepath As String = ""
emailfrom =
System.Configur ation.Configura tionManager.App Settings("Expre ssionOfInterest _Email_From")
emailto = "ss***@soa. org"
emailsubject =
System.Configur ation.Configura tionManager.App Settings("Expre ssionOfInterest _Subject")
Dim message As System.Net.Mail .MailMessage
Dim emailClient As SmtpClient
Dim messageBody = msg.ToString()
Try
message = New MailMessage(ema ilfrom, emailto, "College
Listing Application Form", msg.ToString())
If (emailcc.ToStri ng.Trim <"") Then
message.CC.Add( emailcc)
End If
emailClient = New
SmtpClient(Syst em.Configuratio n.Configuration Manager.AppSett ings("mail.serv er.name").ToStr ing,
System.Configur ation.Configura tionManager.App Settings("mail. server.port"))
emailClient.Sen d(message)
lblerrmsg.text = "Your College Listing Application
Form has been successfully sent."
confirmation.Vi sible = True
MainForm.Visibl e = False
Catch ex As Exception
lblerrmsg.Text = "Your Form is not Submitted.
Please contact web Administrator for this Error."
confirmation.Vi sible = False
MainForm.Visibl e = True
Finally
End Try 0 1027 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: David Wahl |
last post by:
I have written a script to send an email to a large list of emails, it
works fine except for one slightly major thing. Each email needs to have
the receipient's email address at the bottom of the message for removal
purposes. This requires crafting a seperate email for each person. And
therefore I must send an individual email for each person. The problem
is rate. I need to know how I can rate limit the outgoing messages,
and/or make my...
|
by: dmcconkey |
last post by:
Hi folks,
I have a client with four websites. Each site has a contact form that
is identical. They all have "required" fields validated through a
JavaScript onSubmit() function. Upon validation, post values go to a
PHP processing page that adds values to a database and generates an
email to someone in marketing.
For three of these sites, we have no problem, but the fourth keeps
sending in blank forms.
|
by: Rick |
last post by:
I have a form that calls a perl script. A few javascript routines in
the form do a few things prior to submitting. For some reason,
however, the perl script is being called twice (the perl script sends
out an email, and submitting the form once results in two identical
emails.)
Here are excerpts from the script that I believe to be relevant (I can
post more if this isn't enough, but it's long and I'm trying to keep
it brief.) Can anyone...
|
by: RobR |
last post by:
We have a customer using our application that has a problem.
Within our app, we have a two different forms (one generates
an email, the other a fax via a webservice). When they click the
submit button, IE6 is generating the event 6 times!!! So they
end up sending 6 faxes or 6 emails. We simply cannot reproduce
this. We can't find anything wrong in our code that might cause
this, I can't find anything in MS Technet about IE bugs that...
|
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 usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
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 captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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 launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |