Message Sending Failed" .here how i overcome to this error

 Public Sub SendAnEmail(ByVal MsgFrom As String, ByVal MsgTo As String, ByVal MsgSubject As String, ByVal MsgBody As String)


           '  Pass in the message information to a new MailMessage

           Dim msg As New Net.Mail.MailMessage(MsgFrom, MsgTo, MsgSubject, MsgBody)

            '   Create an SmtpClient to send the e-mail

            Dim mailClient As New SmtpClient("1234.5.5") '  = local machine IP Address
            'mailClient.Timeout = 130
            'mailClient.Host = ""
            '  Use the Windows credentials of the current User

            'mailClient.UseDefaultCredentials = True
            ' Pass the message to the mail server


            '  Optional user reassurance:

            MessageBox.Show(String.Format("Message Subject ' {0} ' successfully sent From {1} To {2}", MsgSubject, MsgFrom, MsgTo), "EMail", Windows.Forms.MessageBoxButtons.OK, Windows.Forms.MessageBoxIcon.Information)

            '  Housekeeping


        Catch ex As FormatException

            MessageBox.Show(ex.Message & " :Format Exception")

        Catch ex As SmtpException

            MessageBox.Show(ex.Message & " :SMTP Exception")

        End Try

   End Sub


Please give the solution for this it gives the error.   "Message Sending Failed"
Can you send me snapshots .how to get this  smtp ipaddress or setting smtp


9/16/2008 9:04:32 AM 91979 articles. 3 followers. Follow

3 Replies

Similar Articles

[PageSpeed] 49


Let's look at what is happening behind the scenes.

Can you enable logging, and post the log?

Some of my websites
9/17/2008 8:57:14 PM

Are you sure your host is valid and the mail address you're sending to is valid?

Jeff Wasilauski, MCAD .NET, MCP

"If I have answered your question please mark as answer"
9/17/2008 10:57:14 PM

 Note: A while ago I tried several different examples of how to send mail and none of them worked.  Only after hours of research did I eventually find a post somewhere that said that the mail functions would not work on the development server because there isn't an SMTP server included.  Since you're actually getting an error message, I'm guessing you are using a production server, but I figure the more places I post this information, the better, so less people go through the nightmare I went through.


Using Visual Studio 2008 Standard, VB code behind, 2.0, .Net 3.5
9/17/2008 10:58:35 PM

Similar Artilces:

Intermittent popup "Sending of message failed" errors
I found the following post in this Newsgroup, posted on 4/2003, by Jeffrey Kosowsky. > Under Win98SE, a random and changing proportion of my emails fail to > go through, returning the following message: > Sending of message failed. > > The message could not be sent because connecting to SMTP > server failed. The server may e > unavailable or is refusing SMTP connections. Please verify > that your SMTP server setting is correct and try again, or > else contact your network administrator. I&#...

Retrograding httpHandler from .NET 2.0 to 1.1, get "Parser Error Message: Could not create type" message
Hi there,I have written a httpHandler using VS2005 and .NET 2.0 that builds and works fine.However, I am now having to convert it to .NET 1.1, which I hoped would just be a case of changing the runtime used by the web app (as in running the 1.1 version of aspnet_regiis, with a "-s" switch pointing at my web apps folder). After doing this though (and fixing a few minor differences with web.config), if I then navigate to my handler I get the following error message:Server Error in '/Path/To/MyWebApp' Application.Parser ErrorDescription: An error occurred during the parsing of...

Mail pseudo-error
In a brand new XP system with Netscape 7.1, sending mail (not news) results in the "delivering mail" window, followed soon after by a window headed "Send Message Error" with text "Sending of Message Failed" followed by an indication that the SMTP server refused to handle it. BUT THE MESSAGE *IS* sent successfully! The "delivering message" window ends up saying "Mail sent successfully", with the progress bar still moving because the error message is still there. Closing the error message window closes the "delivering" w...

superreview granted: [Bug 229437] "WARNING: Failed to get a global Object Owner" suppresses actual JS error message : [Attachment 138303] Drop warning since we report the real error anyway
Johnny Stenback <> has granted Karsten "Mnyromyr" D�sterloh <>'s request for superreview: Bug 229437: "WARNING: Failed to get a global Object Owner" suppresses actual JS error message Attachment 138303: Drop warning since we report the real error anyway ------- Additional Comments from Johnny Stenback <> + nsCOMPtr<nsIScriptGlobalObjectOwner> o...

superreview requested: [Bug 229437] "WARNING: Failed to get a global Object Owner" suppresses actual JS error message : [Attachment 138303] Drop warning since we report the real error anyway
Karsten "Mnyromyr" D�sterloh <> has asked Johnny Stenback <> for superreview: Bug 229437: "WARNING: Failed to get a global Object Owner" suppresses actual JS error message Attachment 138303: Drop warning since we report the real error anyway ...

Suddenly started getting "client was not authenticated " error while sending mail
Hi,I was able to send mail with no trouble before few days.Then due to some reason, i Formatted pc &  re-installed visual studio & IIS Now when i try to send mail, i get this error.The SMTP server requires a secure connection or the client was not authenticated.In my web.config file i write<mailSettings>      <smtp from="">        <network host="" port="587" userName="myemail" password="xxxx" defaultCredentials="false&qu...

Sending email, but get the error : could not access "CDO.Message" object
Hi, I use .NET component to write an email sending component. I set the SmtpServer to an internet SMTP server which is used in my outlook express. When I send the email, I got the following error: could not access "CDO.Message" object what is the reason? How to solve? Thank you in advance. You are most likely not authenticating to the SMTP server....

Getting error "Failed to start monitoring changes to..." please help.
I need  H E L P please !!! I have been working with different web sites/projects/solutions using VS2005 on local Windows XP machine. I usually moving such solutions/project to Windows Server 2003 development machine (before final Go Live) and I open them from my local machine over a file share on the server. I always turn on impersonation using a DOMAIN Account because all web sites need to access resources (such CONNX Data Dictionary and license Files) located on other remote machines.I have been following this method for more than a year until now. I mean that I setup the permiss...

"Error sending packet" error message..
Hi everyone, I hope someone can help me out... We are running SQLAnywhere on a Novell 5.0 server, and the workstations are running Windows95, using the SQLAnywhere Client v5.5.04 Build 1964. I have obtained the EBF for the server side of SQLAnywhere and for the workstations, and Ive installed it, and that seems to work fine. The problem we're having is that some of the workstations will get booted out of the server for no apparent reason (SQLAnywhere Client on the workstation says "Error sending packet"). Ive utilized the -ti switch in the server command line and the...

When I click "get messages" no new messages come through... but lots of people are sending me messages!!! Help!
So, I've had thunderbird for a while, and I sorta remember this happening before... but I can't remember how it fixed itself, or what I did to fix the situation... When I send myself a message from my thunderbird account to my hotmail account, I get the message... but when I send a message from my hotmail account to thunderbird (or if someone else sends a message to my thunderbird), I don't receive the message. What is happening and what can I do? No one knows I'm not getting their messages, and I need to get my messages! Help me please! ~Sarah On Or About ...

error "Failed to get datetime data" using 1.0.1
Hello, My situation: I have a vs2005 project with version 1.0.1 (build 5502), database is asa10. When my regional settings are Dutch(Belgium) I have no problems at all. When the settings are Italian(Italy) I get a "Failed to get datetime" error when I retrieve when my data contains dates. When the date fields are not filled in then I do not get the error. A date of '2008-1-1 08:00:00' also gives errors. When I try to retrieve the same data in the datawindow painter I also get no error. Can anyone help me? Greetings, Mich=E8le 2.5 is now th...

How to send "Net Send" messages from a Linux Server
I want to write a Perl script to send net send messages to the windows based computers but my scripts are running on Linux computer. So I can't use $results = `NET SEND $IP_ADDR blah blah blah blah `; how to do this on a linux computer I think that I will have to connect to the receivers port 135 and send the message manualy using perl sockets but I dont know the low level format of the message Can someone help me on this If there is a module to do this that will be great. ________________________________________ Rakhitha Karunarathne Web Master - F...

Help on Error message: "An error occurred while try to load the string resources (GetModuleHandle failed with error "
Hi I have compiled my project in VS.NET (ASP.NET web application in C#) without any build errors. This was in the process of establishing a local setup using the files from the deployed server. Now after copying all the relevant files and compiling them, when I try to browse from IIS (inetmgr) with an appropriate start page (Login.aspx), I get the following error message: An error occurred while try to load the string resources (GetModuleHandle failed with error -2147023888). Description: An unhandled exception occurred during the execution of the current web request. Please revie...

Getting "Problem in Mapping Fragment starting at line ..." error when trying to create table mappings for table associations in ADO.NET Entity Framework

Web resources about - Message Sending Failed" .here how i overcome to this error -

Resources last updated: 12/5/2015 5:54:36 AM