473,385 Members | 2,044 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,385 software developers and data experts.

web form sending 2 identical emails

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.Configuration.ConfigurationManager.AppSetti ngs("ExpressionOfInterest_Email_From")

emailto = "ss***@soa.org"
emailsubject =
System.Configuration.ConfigurationManager.AppSetti ngs("ExpressionOfInterest_Subject")

Dim message As System.Net.Mail.MailMessage
Dim emailClient As SmtpClient

Dim messageBody = msg.ToString()

Try
message = New MailMessage(emailfrom, emailto, "College
Listing Application Form", msg.ToString())
If (emailcc.ToString.Trim <"") Then
message.CC.Add(emailcc)
End If
emailClient = New
SmtpClient(System.Configuration.ConfigurationManag er.AppSettings("mail.server.name").ToString,
System.Configuration.ConfigurationManager.AppSetti ngs("mail.server.port"))
emailClient.Send(message)
lblerrmsg.text = "Your College Listing Application
Form has been successfully sent."
confirmation.Visible = True
MainForm.Visible = False

Catch ex As Exception
lblerrmsg.Text = "Your Form is not Submitted.
Please contact web Administrator for this Error."
confirmation.Visible = False
MainForm.Visible = True
Finally
End Try
Jul 22 '08 #1
0 1006

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
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...
8
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,...
2
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...
6
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
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,...

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.