473,387 Members | 1,561 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,387 software developers and data experts.

mail problem

when I send a mail through the webpage the mail is sent twice to the "to"
address an not once to the "to" address and once to the "bcc" address.

Any help appreciated,
Nic

here's my code:

Sub send_email_confirmation ()

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

'Set the properties
objMM.To = rgdonatormail.text
objMM.From = "ad*******@mysite.com"
'If you want to BCC this email to someone else...
'objMM.Bcc = "ad*******@mysite.com"

'Send the email in text format
objMM.BodyFormat = MailFormat.Text

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

'Set the subject
objMM.Subject = "mysubject"

'Set the body
objMM.Body = "Blablabla"

'Specify to use the default Smtp Server
SmtpMail.SmtpServer = "127.0.0.1"

'Now, to send the message, use the Send method of the
SmtpMail class
SmtpMail.Send(objMM)

End Sub
Nov 19 '05 #1
2 963
sorry: forgot to remove the little ' in the beginning of: 'objMM.Bcc =
"ad*******@mysite.com"
but even removed it doens't work

thx

"nicholas" <mu********@hotmail.com> wrote in message
news:Os**************@TK2MSFTNGP09.phx.gbl...
when I send a mail through the webpage the mail is sent twice to the "to"
address an not once to the "to" address and once to the "bcc" address.

Any help appreciated,
Nic

here's my code:

Sub send_email_confirmation ()

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

'Set the properties
objMM.To = rgdonatormail.text
objMM.From = "ad*******@mysite.com"
'If you want to BCC this email to someone else...
'objMM.Bcc = "ad*******@mysite.com"

'Send the email in text format
objMM.BodyFormat = MailFormat.Text

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

'Set the subject
objMM.Subject = "mysubject"

'Set the body
objMM.Body = "Blablabla"

'Specify to use the default Smtp Server
SmtpMail.SmtpServer = "127.0.0.1"

'Now, to send the message, use the Send method of the
SmtpMail class
SmtpMail.Send(objMM)

End Sub

Nov 19 '05 #2
snt
Your code is looks just fine. Check the value of rgdonatormail.text.
Something is wrong there.

snt
http://www.onlinemall.com
http://www.flexoweb.com

Nov 19 '05 #3

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

Similar topics

5
by: Bruce W...1 | last post by:
In my effort to learn PHP I'm playing with some simple email scripts. They worked a few days ago but they stopped working. The only thing I've done to this Windows 2000 PC in this time was a...
6
by: DigitalRick | last post by:
I have been running CDONTS in my ASPpages to send emails to me sent from my guestbook. It had been working fine untill I upgraded to Server 2003 (I am also running Exchange 2003) all locally. I...
4
by: Trond A. S. Andersen | last post by:
Hi, all! I'm trying to use the System.Web.Mail. "package" combinded with System.Web.Mail.SmtpMail in order to send MS Excel spreadsheets attached to mail messages. However, sending one single...
3
by: Phil Mc | last post by:
Hi has anyone come accross the problem.... with referance to System.Web.Mail.MailMessage and System.Web.Mail.SmtpMail THIS WORKS FINE mail=new MailMessage(); mail.From =...
17
by: LACH | last post by:
When I sent e-mail from within my asp.net application to Hotmail adresses. The e-mail always end up in Junk e-mail. I sent the e-mail as plain/text. Does anyone know how to solve this?
34
by: antonyliu2002 | last post by:
I've set up the virtual smtp server on my IIS 5.1 like so: 1. Assign IP address to "All Unassigned", and listen to port 25. 2. Access Connection granted to "127.0.0.1". 3. Relay only allow...
4
by: k.visube | last post by:
In my ASP application,i need to send a formatted text mail (i.e with newline characters). here in my application i used a function in javascript which construts the mail body sample snippet ...
9
by: shror | last post by:
hi every body, i have a problem which is when i was checking my mail() form it work fine but the problem is that the form configuration is not set correctly, in details: the from var is not...
2
by: joseph2000 | last post by:
Hi, I have problem with e-mails which are being send via System.Web.Mail.SmtpMail class but before describing the problem itself first I'd like to show shortly what I'm doing on the server. ...
9
by: JoeP | last post by:
Hi All, How can I find the reason for such an error: Failure sending mail. Some Code... oMailMessage.IsBodyHtml = False oMailMessage.Body = cEmailBody Dim oSMTP As New SmtpClient...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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,...
0
jinu1996
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...

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.