Error Using System.Net.Mail?
Dec 1, 2008
I posted the following description before and the only suggestion that I received was to switch to System.Net.Mail code. I did switch and I continue to get the same randow and intermittent error.
Problem: Failure of in-house written VBScript that runs from a web page which calls CDO library to send an SMTP message.
Systems: About 100 Windows XP, Professional, Version 2002, SP2 clients using IE6 and IE7. Symantec 10.1.6.6010. All Microsoft patches are regularly installed.
Symptoms: Web application has sent messages for years without error. About December 2007 an intermittent failure began. About 5% of the SMTP messages are not being sent.
Research 1: Added code to trap error and got error number -2147220973 and error description, "The transport failed to connect to the server".
Research 2: Verified that the failed messages were not leaving the client by using a hardware network sniffer.
Research 3: Used SysInternals/ TCPView to monitor while sending messages.It didn't always show when a message was sent.Perhaps it needs to operate at a lower speed than 1 second. When TCPView did show something it was that ccApp.exe,Symantec antivirus,was communicating with the SMTP server.
Research 4: Reviewed all tools available in Sysinternals but didn't find any way to monitor the messages better than TCPView.
Research 5: Placed error checks throughout the code and proved that the error is in the iMsg.Send command.
Set iMsg = CreateObject("CDO.Message")
iMsg.Send
View 1 Replies
ADVERTISEMENT
Jul 13, 2010
I am tring to send e-mail used VB 2008. Below is my code. The error message I am getting is "5 Failure sending mail at System.Net.mail.client.send(MailMessage message).I have two questions. 1.) What am I doing wrong? & 2.) Is there a way the get a more description error message.
message As
New System.Net.Mail.MailMessage
Dim mySmtpsvr[code].....
View 2 Replies
Jun 16, 2011
I am writting a program to sendout email by reading from SQL database and get the data out for the email information: To, From, subject, body and attachment. I am importing system.net.mail. But My email will send without any attachment but it will not send with the attachment. It give me this error: Logon Failure: Unknow UserName or bad password. However if I send the email with the attachment that is not get from the sql database. It will send just fine.
[code]...
View 2 Replies
Jan 6, 2009
Sends emails with a pdf report attachment for the fire impairments. WORKS GREAT for in house emails but gets the error mentioned when sending outside of the hospital to the fire department. I can email from outlook to ERROR@cityofwsfire.org just fine.[code]
View 5 Replies
Apr 14, 2009
I have a project that up until recently has been working fine. It sends an email message to a user once a file has been successfully uploaded, registered and/or approved to use the website. It is written in VB.NET framework 1.1, running ASP.NET on a Windows 2003 server SE sp2.
First the code
Public Sub EmailAfterRegister(ByVal sEmail As String, ByVal sUser As String)
Try
[code]....
This has worked for over one or two years. Today I realized upon testing I get the following error:The procedure entry point IstrcmpiI could not be located in the dynamic link library MSDART.DLL.Upon some research I found that maybe I needed to install MDAC 2.8, which i downloaded and installed today, however i still get the same error. I have had my communications and network admins check traffic and connectivity to the smtp server and all is working fine. Yet I still get the error.
View 2 Replies
Oct 19, 2011
I've implemented with Visual Basic 10 an application for Net Framework 4 with functionality to send files via e-mail using System.Net.Mail. It works well except when it comes to sending an XML file whose name contains accents. In the latter case the UTF-8 name is not correct, so Widows Mail Life presents him with name consisting of a set of meaningless characters. Furthermore, the content has lost the format of lines and spaces, presented part of MIME type information in the header, so that it is unreadable XML readers. However, with a name without accents is sent successfully.[code]....
View 3 Replies
Jun 21, 2012
The exact error I am getting in Visual Studio 2012 is:
error BC30456: 'Dispose' is not a member of 'System.Net.Mail.SmtpClient'.
Dim SmtpServer As New SmtpClient()
Dim mail As New MailMessage()
SmtpServer.Port = 25
[code]....
This should be an obvious error. You would think I was using .net framework 3.5 or lower as Dispose() was only added as a member to SmtpClient in .net 4.0. However, I am using 4.0!In the website property pages it states 4.0. Is there somewhere else that I need to set as 4.0?
View 2 Replies
Mar 29, 2012
I am teaching myself vb.net and wanted to change this code to have an embedded mail.boby from a text file instead of the file attachment. Code spippet below and where I need help is mail.Body = ("tracertALL.txt")
that just puts the name of the file NOT the contents of the file. This code is a CMDWrapper that runs a batch file and I want the contents of a trace route that is pipe to a file >> tracertALL.txt .
[Code]...
View 18 Replies
Apr 8, 2011
Sending email in .NET through Gmail
I tried sending e-mail with Gmail SMTP and System.Net.Mail as follows[code]....
View 2 Replies
Jul 13, 2011
I've updated my old style of sending emails from
[Code]...
View 1 Replies
Mar 13, 2011
i am developing with vb2005, using system.net.mail to send mail using google configuration. a full sample of my code was posted here earlier
With smtp
Host = "smtp.google.com"
hort = 465
UseDefaultCredentials = False
[Code]...
i get the operation has timed out. if i change the port to 587, it says that the server does not support secure connection
[EDIT]could firewall be blocking it?
is there anyway to specify sending application name?
View 4 Replies
Mar 30, 2012
I'm teaching myself vb.net and found this VB.NET SMTP codeand I wanted to add a mail.cc and mail.bcc but get an error Property cc is ReadOnly.and don't know how to fix. then I found this code
Dim CC As MailAddress = New MailAddress(TextBox5.Text) 'For some reason it's required field
mail.CC.Add(CC)
[code].....
View 8 Replies
Apr 8, 2011
I need a feedback form for my site.i need the user to write there.
Mail
Title
Info
And then when they press send then i get a mail to my hidden mail and a confirmation is send to the user mail.I have google the web but cant find any good info about this, i know how to make the form but how do i make the codebehind !?
Do any of u pro. have a link to a great tutorial or have a code that can be used !?
View 5 Replies
Apr 12, 2010
I have this unusual problem with mailing from my app. At first it wasn't working (getting unable to relay error crap) anyways I added the proper authentication and it works. My problem now is, if I try to send around 300 emails (each with a 500k attachment) the app starts hanging around 95% thru the process.
Here is some of my code which is called for each mail to be sent
[Code]...
View 2 Replies
Mar 12, 2011
am using system.net.mail to send email as shown below, but its too slow. it takes about a minute to send, whats wrong with my code. Am calling the code below in backgroundworker_dowork. is there a faster alternative, maybe free or open source code
' send the email '
Dim smtp As SmtpClient = New SmtpClient()
Dim mail As New MailMessage()[code]............
View 2 Replies
Jul 16, 2011
I have developed application using vb.net for sending email. I tried to sent it from windows xp.its works fine .But When i try to send it from windows 2003 server but mail will not be sending.
View 4 Replies
Apr 24, 2010
I want to use System.Net.Mail.SendAync in an ASP.NET MVC2 application. I see that it throws an InvalidOperationException if there is already a SendAsync call in progress. Does this mean only one SendAsync is allowed per host, or per thread? For example, if I simultaneously have 2 web users from 2 different remote hosts, can each use SendAsync at the same time?
View 1 Replies
Mar 8, 2010
I am trying to send an email by using my MailEnable email account but this code produces the following exception:
"Syntax error, command unrecognized. The server response was: Welcome to MailEnable POP3 Server"
If I use port 8080, I get a timed out exception.
Private Sub SendWebMail()
Dim myServer As New SmtpClient("listserv.company.com", 110)
myServer.Credentials = New System.Net.NetworkCredential("Alert@mmail.company.com", "Password369")
[code]....
View 3 Replies
Sep 19, 2009
In ASP.NET, I can just put my mailSettings in web.config and then ystem.Net.Mail.SmtpClient's default constructor will read them. In a regular VB.NETroject, not ASP.NET, I thought I could just put mailSettings in app.config. HoweverSmtpClient() doesn't appear to read settings from app.config. Is there a step I'm missing in order to tell a VB.NET application to read from app.config?
View 3 Replies
Sep 5, 2011
I want to add reference system.net.mail but I am not finding it my reference liberary. How can I Import that reference.
View 6 Replies
May 19, 2010
I am trying to use System.Web.Mail (using this example url...) to send email bit the Import is failing. The Imports knows of System.Web but there is no .Email.
View 2 Replies
Mar 11, 2010
I am trying to send an email message in HTML Format. I have a richtextbox the the user can change the color and font in the message. Below is the code I am using which ends up send in Text Format. Most codes I have found use System.WebMail which in vb 2008 is obsolete. This snippet is using System.Net.Mail namespace.
Public Shared Function SendEmailMessage(ByVal sendTo As String, _
ByVal sendFrom As String, _
ByVal sendSubject As String, _
[Code]....
View 2 Replies
Nov 13, 2009
Can someone provide a difinitive answer for how to code for System.Net.Mail (for VB)?I'm tryng to resolve the "System.IO.IOException Unable to read data from the transport connection " that cropped up after a recent Server update. The code was working fine until an update came down the other day.[code]
View 9 Replies
Jun 14, 2011
I'm having an issue where the ContentLength is being set to 0 when I try to use an external function to save a file toa server after I use the same file as an attachment:Dim tempFileColl As HttpFileCollection = Request.FilesDim tempFile As HttpPostedFile = tempFileColl.Get(0)
View 1 Replies
May 29, 2009
I get the following error:Application-defined or object-defined error.From what I can understand, it's when I attempt to attach a file to the email, I get that error. What I noticed is that it's because the file is in use.Is there anyway to attach the file anyway? My users are simply not closing their files after saving, right now I'm using computer manager to kick them out. The process is for them to save a file on a server through a share and then I pick that up and send it. Works fine as long as they close the file after save.
View 7 Replies
May 19, 2009
I use the System.Net.Mail namespace to send email messages in my application and I have a beta customer that reported that some characters were not coming through correctly on his CZECH box. I was not currently giving the option to the user to select an encoding, but I think that I actually should be.
View 6 Replies
Feb 9, 2010
I am using the System.Net.Mail namespace to create and send email messages. Everything was working fine until a couple of QC members of our team noticed something strange.
If they send emails from within my application and then leave the application open for a while (perhaps working on other tasks on the PC), when they try and activate my application again, it appears to be hung. The CPU is not pegged and everything appears to be normal in the task manager. We narrowed it down and it appears that this issue only manifests itself when MS Outlook is also opened and connected to a server.
I was playing around with process monitor, but nothing I saw was really glaring. I actually started deleting some threads on the PC and eventually my application became usable again.
View 6 Replies
Aug 12, 2009
Do anybody have sample code for mailing using System.net.Mail
View 1 Replies
Jan 28, 2009
Is there any possible way to send e-mail using VB.net on an Windows XP Home operating system? having to work around the IIS issue by jeopardizing my computer. I've looked around a lot and just can't figure it out for myself.
View 2 Replies
Dec 9, 2010
I'm working on an application that will send an email at a certian point.I'm using System.Net.Mail and it works fine when I do a "Debug - Start Debugging". But when I build the application, and run it, it crashes the whole thing when it gets to the client.Send(message) part.[code]
View 7 Replies