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

MailMessage = Nothing

I've got a VB.NET web service that checks an email queue in a database.
We've been getting a spike in the RPC service on the email server. The
service is not running on the email server that it's using to send the email.

Dim emailTable As DataTable
Dim i As Integer
Dim Message As New MailMessage
Dim MailServer As SmtpMail

Try
'get a table with the queued emails
emailTable = CheckQueue()

For i = 0 To emailTable.Rows.Count - 1
Message.To =
NullToEmptyString(emailTable.Rows(i).Item("to_addr ess"))
Message.From =
NullToEmptyString(emailTable.Rows(i).Item("from_ad dress"))
Message.Cc =
NullToEmptyString(emailTable.Rows(i).Item("cc_addr ess"))
Message.Body =
NullToEmptyString(emailTable.Rows(i).Item("bcc_add ress"))
Message.Subject =
NullToEmptyString(emailTable.Rows(i).Item("subject "))
Message.Body =
NullToEmptyString(emailTable.Rows(i).Item("body"))
Message.BodyFormat = MailFormat.Html

MailServer.SmtpServer = "mail.corp.com"
MailServer.Send(Message)
Next

Catch ex As System.Exception

Finally
Message = Nothing
End Try

I'm thinking the Message = Nothing might be the problem, as the object is
unmanaged?? I could pull it out, but the problem is on and off, so I
couldn't be sure that's the fix.

Any suggestions.

Dan
Aug 8 '05 #1
0 1036

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

Similar topics

5
by: martin | last post by:
Hi, I have created a class that is totally seperate from my web application. However this class is used extensivly by the web application for stuff like data access. I wish to add a function to...
0
by: gh0st54 | last post by:
Hi i'm looking for how to change the date of out going messages i tried this but it doesn't seems to work static public bool SendEmail(string To, string From, string Subject, string Body,...
4
by: Aren Cambre | last post by:
Why does SmtpMail.Send throw an exception if the MailMessage's BodyFormat = MailFormat.Html? I've searched all over the place and cannot find a solution anywhere. I am running this on Windows XP...
3
by: Anthony Fine | last post by:
Hello All, I have a VB.Net app that needs to send mail. I have created a class for building my e-mail, but keep getting the error (Could not access 'CDO.Message' object.) when trying to send...
6
by: Jul | last post by:
Hi, I use MailMessage class for create email. I specify such settings: mmEmail = New MailMessage mmEmail.To = ".." mmEmail.Body = "..." mmEmail.Subject = "..." mmEmail.BodyFormat =...
0
by: edwilli | last post by:
I've got a VB.NET web service that checks an email queue in a database. We've been getting a spike in the RPC service on the email server. The service is not running on the email server that it's...
0
by: Scott Townsend | last post by:
I'm trying to send an email and get a delivery receipt back. I'm setting the MailMessage.DeliveryNotificationOptions = DeliveryNotificationOptions.OnSuccess and it works great for the First email...
4
by: a | last post by:
Hi I want my application uses the instance of MailMessage and SmtpMail classes to send email. How can I add a reference to the System.Web.dll assembly to use these classes? Do the SmtpMail...
2
by: =?Utf-8?B?Q2FwdGFpbiBEYXZlIQ==?= | last post by:
I wrote some code to send an email with two alternate views: 1) html 2) plain text All the html enabled email clients accept the html just fine and disregard the plain text version. However,...
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
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:
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
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...
0
agi2029
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.