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

Slow system.net.mail performance?

I've made small class to sent email using the system.net.mail namespace and
it is really slow. any ideas why i'm having such a performance hit?

it seems to work much better when i don't use authentication, however, it's
very slow when i do use it.

******************
Imports Microsoft.VisualBasic
Imports System.Net
Imports System.Net.Mail

Public Class emailhelper
Sub sendmail(ByVal emailto As String, ByVal emailfrom As String, ByVal
emailfromname As String, ByVal body As String, ByVal subject As String)
Dim Msg As MailMessage = New MailMessage()
Dim MailObj As New
SmtpClient(ConfigurationManager.AppSettings("SmtpS erver"))
MailObj.UseDefaultCredentials = False
MailObj.Credentials = New
Net.NetworkCredential("em*********@test.com", "password")
MailObj.DeliveryMethod = SmtpDeliveryMethod.Network

Msg.From = New MailAddress(emailfrom, emailfromname)
Msg.To.Add(New MailAddress(emailto))
Msg.IsBodyHtml = "True"
Msg.Body = body
Msg.Subject = subject
MailObj.Send(Msg)

End Sub
End Class
Apr 9 '06 #1
0 1443

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

Similar topics

0
by: Rainer | last post by:
Hi folks, Yesterday I have upgraded my linux box with a pair of Xeon 1G CPU and reinstalled everything (it was a sinle Xeon 700). The default RH9 installation comes with MySQL 3.23.54. After the...
3
by: gizmo | last post by:
I have a stored procedure that queries a database using a Select statement with some inner joins and conditions. With over 9 million records it takes 1 min 36 sec to complete. This is too slow...
5
by: Kurt Bauer | last post by:
I have an ASP group calendar application which pulls calendar data from Exchange via webdav into an XML string. I then loop the XML nodes to populate a collection of appointments. Finally I use...
8
by: BlueBall | last post by:
I am writing some kind of network testing tool and I have wrote the following code in ASP.NET with C# int size= 10048576; // around 10 MB data string buffer = ""; for (int j=1; j<=1024;...
16
by: Dean R. Henderson | last post by:
I have a project built for ASP.NET that recently started running really slow in debug mode (it takes about 10 seconds or more to step from one line of code to the next). This just started...
52
by: frankgerlach | last post by:
>From my simple performance tests of SOAP it seems that it is about ten times slower than binary object request protocols such as RMI, IIOP or SimpleORB. Is this also YOUR experience ?
4
by: =?Utf-8?B?dHBhcmtzNjk=?= | last post by:
I have a web page that at the click of a button must send a bunch (1000+) emails. Each email is sent individually. I have the code working fine, using Mail Message classes and smtp and all that. ...
10
by: Arno R | last post by:
Hi all, So I bought a new laptop 10 days ago to test my apps with Vista. (home premium) Apparently Office 2007 is pre-installed. (a time limited but complete test version, no SP1) So I take the...
7
by: colin | last post by:
Hi, Ive written a 3dmodel editor, and it works fairly well it harldy uses any cpu exept when its loading a texture from bitmap in the debugger, at all other times it hardly uses any cpu but from...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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...

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.