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

Forcing a new SMT session

Hello.

I'm using System.Net.Mail.SmtpClient class to send e-mails.

Actually, I'm breaking the recipients in lots of 10 emails for each e-mail I send, and sending it to a machine that has the SMTP program that delivers the messages.

For understanding how it is working, there is a little sample that I wrote for brevity:

'colEmails is a ArrayList collection of System.Net.Mail.MailMessage objects.
'this collection was done to set a maximum of 10 recipients for each email object.

'send all email objects
For i as Integer = 0 to colEmails.Count - 1
Dim objSmtp As New System.Net.Mail.SmtpClient
objSmtp.Send(colEmails.Item(i))
Next

'Note ==I need to send each email object using a new SMTP session

But, we noticed in the SMTP program, all the e-mails were sent by one session only. I thought the code above would do that, once I'm starting a new SmtpClient object for each email object. But didn't.

My doubt is, we need to configure the SMTP program ou it could be done by code, so it start a new session automatically instead of staking in a existent one? And how we can do it?

Cesar
Jun 8 '07 #1
2 1255
ronchese,

My first question out of curiosity, is why you need a new session?

This may be a question for a Microsoft engineer to determine whether this is
the default behavior.
Steve

"ronchese" <info(a)carsoftnet.com.brwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
Hello.

I'm using System.Net.Mail.SmtpClient class to send e-mails.

Actually, I'm breaking the recipients in lots of 10 emails for each e-mail I
send, and sending it to a machine that has the SMTP program that delivers
the messages.

For understanding how it is working, there is a little sample that I wrote
for brevity:

'colEmails is a ArrayList collection of System.Net.Mail.MailMessage
objects.
'this collection was done to set a maximum of 10 recipients for each email
object.

'send all email objects
For i as Integer = 0 to colEmails.Count - 1
Dim objSmtp As New System.Net.Mail.SmtpClient
objSmtp.Send(colEmails.Item(i))
Next

'Note ==I need to send each email object using a new SMTP session

But, we noticed in the SMTP program, all the e-mails were sent by one
session only. I thought the code above would do that, once I'm starting a
new SmtpClient object for each email object. But didn't.

My doubt is, we need to configure the SMTP program ou it could be done by
code, so it start a new session automatically instead of staking in a
existent one? And how we can do it?

Cesar

Jun 9 '07 #2
It's a customer request. If it is something not usual, I'm going to say
them, because I don't see anything really usefull on it, also.
;)

"PlatinumBay" <st*******@community.nospamwrote in message
news:uB**************@TK2MSFTNGP04.phx.gbl...
ronchese,

My first question out of curiosity, is why you need a new session?

This may be a question for a Microsoft engineer to determine whether this
is the default behavior.
Steve

"ronchese" <info(a)carsoftnet.com.brwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
Hello.

I'm using System.Net.Mail.SmtpClient class to send e-mails.

Actually, I'm breaking the recipients in lots of 10 emails for each e-mail
I send, and sending it to a machine that has the SMTP program that
delivers the messages.

For understanding how it is working, there is a little sample that I wrote
for brevity:

'colEmails is a ArrayList collection of System.Net.Mail.MailMessage
objects.
'this collection was done to set a maximum of 10 recipients for each
email object.

'send all email objects
For i as Integer = 0 to colEmails.Count - 1
Dim objSmtp As New System.Net.Mail.SmtpClient
objSmtp.Send(colEmails.Item(i))
Next

'Note ==I need to send each email object using a new SMTP session

But, we noticed in the SMTP program, all the e-mails were sent by one
session only. I thought the code above would do that, once I'm starting a
new SmtpClient object for each email object. But didn't.

My doubt is, we need to configure the SMTP program ou it could be done by
code, so it start a new session automatically instead of staking in a
existent one? And how we can do it?

Cesar

Jun 9 '07 #3

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

Similar topics

2
by: Miki Tebeka | last post by:
Hello All, If there a way a script can tell Python to enter interactive mode even if the -i command line switch was not given? I want py2exe to create an interactive session, without writing...
7
by: Mark | last post by:
Hi - I have a document management system in ASP/VBScript, which copies files to a http://www./files directory. While uploading files to that directory, it also updates a database with full path...
1
by: Philip Townsend | last post by:
I have a user control which displays the contents of a shopping cart. I wnat it to update everytime an item is added or deleted from the cart. I have created a button which edits a Session object,...
5
by: Andy G | last post by:
Is it possible to force a new session id without the client closing the browser? I'm using session id in my database and I need a new session id when a client clicks a certain link. I know I...
0
by: Dan Kraiman | last post by:
I am using version 1.1 of the .NET framework on IIS 6/Windows 2003. 1. Is there a way to force all ASP.NET applications to have secure cookies (ie send them using SSL), without modifying the...
1
by: Brett Kelly | last post by:
Ok, I know this sounds odd. Let me explain further. I have an ASP.net page (w/ C# code behind) that, when given a session variable containing the path to a local file, will attempt to start the...
2
by: Sergey Poberezovskiy | last post by:
Hi, I have an application where I need to ensure that users do not use browser navigation buttons. I specifically warn the users, and in every page set the folllowing:...
10
by: hughestroop | last post by:
I have updated my CSS and if you view the main page with the old css cached, it breaks the page. Is there any way to force viewers that have the old css cached to get the new css? Our viewers...
8
by: Edward Diener | last post by:
Is there a way in Javascript, or perhaps in HTML, to force a browser to re-render an image on an HTML page after a round-trip between the client and the server ? In my particular case, the image...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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:
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...
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...

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.