VS 2008 - Send Email But Stuck With The GeneralFailure Error Caught With Try And Catch

Jun 3, 2010

I am currently trying to send Email but am stuck with the GeneralFailure error caught with try and catch. I got the sample code somewhere off the internet last week and modified it when I have the chance.

The following is the code I am working on for now.

Private Sub btnSend_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSend.Click
Dim message As System.Net.Mail.MailMessage
Dim mailClient As New System.Net.Mail.SmtpClient("smtp.live.com", 25)

[CODE]...

Is there anything unnecessary, missing or am I on the wrong track? Right now I am trying to test send a mail from hotmail to gmail or another live account. Also, I have tried searching through the internet for a solution and some said I need to have IIS which I had it installed for it to work. Another said I need to add a reference but did not specify it. Those were pretty old messages though.

View 6 Replies


ADVERTISEMENT

Catch Error But Still Log It And Send Email?

Feb 24, 2011

First I found that you can catch it and log it inside a catch, but this doesn't send an email. Then I found out about using the Error Signal class. That worked, however what wasn't apparent from reading, is that it treats the error like normal, so when I signal the error it goes to the custom error page still, I don't want that to happen. What I want to do is catch that error, log it, send the email, but stay on the page the error happened so I can provide special feedback. I do not want it go to the custom error page.

This is what I have and it redirects me to the custom error page.
Try
smtpClient.Send(mailMessage)
Catch smtpEx As SmtpException
errorSignal.FromCurrentContext().Raise(smtpEx)
Catch ex As Exception
[Code] .....

View 2 Replies

WebException Not Caught In Try/catch Block?

Feb 3, 2011

I've tried to Google this problem, but haven't found any relevant results.I am trying to handle HTTP 500 errors when logging into a web service (the web service returns 500 when login is incorrect). An WebException is thrown, but I can't seem to catch it properly. The exception is highlighted in green instead of the normal yellow (having trouble finding info on this as well)

[Code]...

View 6 Replies

Asp.net - How To Email Error Msg In Catch

Feb 14, 2011

I have the code below which I now need to figure out how to not only display but also email it all to my email, this way should any user encounter a error we get to see exactly what is it.

[Code]...

View 4 Replies

Email Generated Via MailMessage Caught As Spam?

Aug 18, 2011

I generate emails from my website to deliver order notifications to my customers.Some of these emails are treated as spam by spam filters. I've used MailingCheck to examine the emails and one of the problems contributing to it being identified as spam is:PRIORITY_NO-NAME Message has priority but no user agent nameIs there anyway within asp.net that I can resolve this problem? Presumably by somehow setting th

View 3 Replies

Thrown Custom Exception Is Immediately Caught In The Same Catch Block It Is Thrown From?

May 13, 2012

This may be a debugger issue, but here goes:I have this piece of code:

Private Function Connect() As Boolean
Try
sessionBegun = False[code].....

My intention is to 'convert' the low level exception into something more meaningful, so I throw an exception of my own creation. I want this to bubble up to a place where I can handle it.However what is happening is my debugger breaks and tells me that an exception of type "QuickBooksConnectionException" was thrown.I know that, I just threw it, why are you catching it? From what I've read, this ought to work, and there doesn't appear to be an analogous Java throws keyword, so perhaps it is my debugger.

View 3 Replies

Error When Using Outlook To Send An Email From 2008 When Outlook Is Running?

Aug 5, 2011

If i use this code to send an e-mail with outlook (2010) from my vb.net app (2008):

Dim app As Microsoft.Office.Interop.Outlook.Application
Dim appNameSpace As Microsoft.Office.Interop.Outlook._NameSpace
Dim memo As Microsoft.Office.Interop.Outlook.MailItem
app = New Microsoft.Office.Interop.Outlook.Application

[code]....

I get an error. It's work fine, when outlook is not running.

View 9 Replies

VS 2008 Stuck At Error NullReferenceException Was Unhandled

Mar 26, 2011

[code] this is my code n i want to store data at runtime in the my database.i used data base as an access07 and my platform is vb.net..Now come to the point when i run the project it terminates when i'm inserting my data in the access file.[code]

View 4 Replies

Send Error Via Email Silently?

Feb 26, 2010

If an error occurs in my application, I'd like an email to be silently sent to me with the error description (as long as the internet connection is established).

I know how to send emails in VB.Net, but I wonder what is the best way to get this done.

Is this something that should be done in a module? I could use some advice on the subject before I start coding.

View 9 Replies

Email To Send Picture Error On My Solutions?

Apr 26, 2011

Email to send picture error on my solutions?

View 2 Replies

Exchange Server Email Gets Stuck Drafts Folder Not Being Sent?

May 11, 2012

I'm trying to use an Exchange Server to send emails from asp.net web application and atm the mail is getting stuck in the drafts folder and not being sent.Emails are being sent fine if i send them using browser or outlook directly. Also if i go to the drafts folder and manually send the vb.net created emails they re being sent and received fine aswell, but that isn't a long term option.

[Code]...

View 2 Replies

Exchange Server Email Gets Stuck In Drafts Folder Not Being Sent?

May 11, 2012

I'm trying to use an Exchange Server to send emails from asp.net web application and atm the mail is getting stuck in the drafts folder and not being sent.Emails are being sent fine if i send them using browser or outlook directly. Also if i go to the drafts folder and manually send the vb.net created emails they re being sent and received fine aswell, but that isn't a long term option.Here is the relevant part of the code i m using.

Try
Dim service As ExchangeService
Dim service As New ExchangeService(ExchangeVersion.Exchange2007_SP1)

[code].....

View 3 Replies

VS 2008 - Send More Than One Email To Myself My Email Address Keeps Repeating Itself In The "To" Box

Dec 22, 2009

i'm using the following code to send an email:

[Code]...

The problem is if I send more than one email to myself my email address keeps repeating itself in the "To" box. If I send an email to myself 3 times, the 3rd e-mails "To" box will say:

[Code]...

View 4 Replies

Error - Catch Cannot Catch Type 'Microsoft.Office.Interop.Outlook.Exception'

Mar 25, 2011

I have a program in VB.Net that receives mails from Outlook, extracts attachments and inserts the attachments into a table through a query. I would like to put the query/queries in a Try/Catch block, but cannot do so as Outlook exceptions cannot be caught, and it gives me an error, and unless I put a very specific exception, I cannot catch it. Is there a workaround?

Edit:

Try
Catch ex As Exception
End Try

Exception is underlined and when I hover on it, it says: "Catch cannot catch type 'Microsoft.Office.Interop.Outlook.Exception' because it is not in 'System.Exception' or a class that inherits from 'System.Exception'". This is affecting all my other code which I'd like to put into a Try/Catch block.

View 2 Replies

Restructure Try / Catch To Eliminate Error On Myreader.close Command In Catch Part?

Jun 19, 2012

The following code causes a "Warning" that Variable is used before value assigned.How do I restructure this Try/catch to eliminate error on the myreader.close command in the Catch part? Code appears to work fine but I dont like Warnings. [code]

View 8 Replies

Button_click Event Will Not Stop Execute After Error Catch Using Try - Catch Statement

Apr 1, 2011

i have problem when i click a ADD button, there is one null value in the textbox .. so the try catch statemnt is to catch that null value error but after that the catch is success but the button click never stop excute the statemnt till the end of the button event.

View 6 Replies

Send Email In 2008?

Nov 25, 2009

This is not a homework assignment, I am trying to create a program I could use at work to make my job a little easier. I need to send a number of email in a day to one address. so I would like to create a form that I could just make a few clicks then hit send and I can go on with my day. I was able to do this in vb6 easy enough. but I can't get past the authentication error in vb2008.[code]...

View 4 Replies

VS 2008 Cannot Send Email?

Apr 15, 2010

I've got the below code which will send me an email of error details when dealing with customers. The problem is the email only seems to successfully send from certain ISP's. Could it be that even though the correct authenication details have been eneterd that certain ISP's are blocking port 25?

[Code]...

View 1 Replies

VS 2008 Send An Email To Myself?

Dec 22, 2009

How would I use VB.NET to send an Email to myself?

View 10 Replies

VS 2008 Send Email In VB?

Dec 21, 2009

How would i send a email in VB?,

View 1 Replies

[2008] Send An Email Via App?

Mar 2, 2009

can i do that? if i have a combobox that have (ex. 10 email addresses) and a text box to write a subject and a button to send email to a specific value from the combobox with the subject can i do this?

View 26 Replies

Send An Email Via Smtp In VB 2008?

May 11, 2009

I'm using this code to send an email via smtp in VB 2008:

Dim smtp As SmtpClient = New SmtpClient("mail.mydomain.org")
Dim SMTPUserInfo As NetworkCredential = New NetworkCredential("notifications@mydomain.org", "mypassword")

[Code]....

This has had me stumped for the last week, but I think I got a little closer to atleast identifying the problem when I took it home. Ok, the code above doesn't work when I'm at work for some reason. The exception message is: "Unable to connect to the remote server. ". Seems odd because I am simply using the internet to connect to my smtp server to send an email. When I'm at home, this works just fine.

what is stopping it from going through when I'm at work? If I atleast know that, I may be able to tell our network guys what it is so they can allow it to get out.

View 1 Replies

Send Email Through Hotmail By Using VB 2008?

Mar 17, 2010

Anyone knows one module or example in Visual Basic Express 2008 to send one email by using Hotmail Acount ? I see you have a lot of examples here but i cant see one example to send email by using hotmail account with visual 2008?

View 1 Replies

Send Email Using Program 2008?

Aug 9, 2011

Possible Duplicate:Sending email in .NET through Gmail

View 1 Replies

Send Email With Attachment .net 2008?

Jan 28, 2012

I have designed an application. I want the user to send the attachment back to my gmail account. Does it matter which account they use inorder to send it back? I have seen lots of code from sending from a gmail account. I statrted to look at the below code THEN realised users will hae various accounts.

Private Sub Email_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Email.Click
Dim mail As New MailMessage()
Dim att = New Attachment("J:\vb\RizRandom\RizRandom\Results\UBM.xlsx")

[code]....

View 2 Replies

VS 2008 Send EMail Via SMTP?

Mar 13, 2010

Does anyone know of any free SMTP Email providers? Like a GMail alternative?

View 1 Replies

VS 2008 Send Same Email To 2 Guys At Once?

Sep 9, 2009

I'm using a smtp send email function from microsoft.com but idk how to send same email to 2 people at once..
This is piece of

Dim MyMailMessage As New MailMessage()
MyMailMessage.From = New MailAddress("test@vb.com") 'From E-mail
MyMailMessage.To.Add("ne0@live.com") 'Send to E-mail
MyMailMessage.Subject = ("test") 'Subject
MyMailMessage.Body = "a"

View 7 Replies

VS 2008 Way To Send HTML Email?

Aug 11, 2009

I have an asp website. one page displays upcoming events for the next 7 days. I get the event information from a mysql database. Now I need to send out an email in vb.net of that asp page. What's the best way to do this. I send emails with another program of mine and I biuld the html string using a stringbuilder

View 1 Replies

Send An Email In VB 2008 Express Edition?

Dec 15, 2009

A Form on visual basics express, with one button (button1)

- One Textbox (Textbox1)

-. No Imports.

What I need -

- Click that button1, and the message in Textbox 1, is sent to [url].....I've copied tons of code from the forums that come up with error messages, most likely have the wrong imports, so please in your reply, state the imports I need,then the codes, for VB 2008 Express.

View 3 Replies

Send Email With Outlook By Using VB 2008 Express

Mar 17, 2010

First see the code i did ---

Dim Email, Cuerpo, NombreCompleto, Correo, Titulo As String
Dim emailMessage As New System.Text.StringBuilder
Email = ListView1.SelectedItems.Item(0).SubItems(4).Text

[Code].....

the problem its .. when i run the code in the body of the outlook cant insert NEW ROW , i used vbcr , chr(10) etc etc etc .. :S

make one code to insert new rows in my outlook

Cuerpo = "&body=Estimado(a) " + NombreCompleto + " :"
Cuerpo = Cuerpo & vbCr & " Hola"
the vbCr wont work :(

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved