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

sendmail hangs when I declare an api function

I have a simple mailsys solution that works splendidly.

I decided to add a listview with file association icons to replace a listbox
that displays the full path only of an attachment. But when I add this
(which I need to get the file association icons):
Private Declare Ansi Function SHGetFileInfo Lib "shell32.dll" (ByVal pszPath
As String, ByVal dwFileAttributes As Integer, ByRef psfi As SHFILEINFO,
ByVal cbFileInfo As Integer, ByVal uFlags As Integer) As IntPtr

The system now runs but hangs once I call sendmail. Without this call in
the declarations section above the load event, the system works fine. Any
ideas why just having a call like this in the declarations section would
hang up sendmail?

Thanks for any help.

Bernie Yaeger


Nov 21 '05 #1
1 1013
OK, I have found out a little more: the hang is in a try catch block:
Try

SmtpMail.Send(msg)

sendcount += 1

Catch ex As Exception

xcount += 1

MessageBox.Show("Mail send error; please check the 'from' address and/or the
SMTP Server settings.", "Send Error", MessageBoxButtons.OK,
MessageBoxIcon.Hand)

End Try

If I remove try..catch..endtry and simply call smtpmail.send(msg) it works
fine. Any ideas?

Bernie

"Bernie Yaeger" <be*****@cherwellinc.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
I have a simple mailsys solution that works splendidly.

I decided to add a listview with file association icons to replace a
listbox that displays the full path only of an attachment. But when I add
this (which I need to get the file association icons):
Private Declare Ansi Function SHGetFileInfo Lib "shell32.dll" (ByVal
pszPath As String, ByVal dwFileAttributes As Integer, ByRef psfi As
SHFILEINFO, ByVal cbFileInfo As Integer, ByVal uFlags As Integer) As
IntPtr

The system now runs but hangs once I call sendmail. Without this call in
the declarations section above the load event, the system works fine. Any
ideas why just having a call like this in the declarations section would
hang up sendmail?

Thanks for any help.

Bernie Yaeger

Nov 21 '05 #2

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

Similar topics

4
by: lawrence | last post by:
We're installing a new server at the office and this will be the first server we set up from which we host our website. We got tired of dealing with Interland and decided to bring our hosting...
0
by: Wayno | last post by:
Hoping someone can help me out with this problem. First problem, is I am unable to view my php error log. In my php.ini I have my log in /var/www/logs/php_error_log. However, it has remained empty....
12
by: JD | last post by:
This is another Python problem, I think might be unrelated to the earlier bug I found, and eventually figured out how to report it to Sourceforge. This is related to a question I have about...
1
by: Bernie Yaeger | last post by:
I have a simple mailsys solution that works splendidly. I decided to add a listview with file association icons to replace a listbox that displays the full path only of an attachment. But when I...
1
by: Ronny Sigo | last post by:
Hello all, I am trying to import the contents of an Excel sheet into my Access Database. When clicking the button excel opens allright and does what I programmed (the cells get updated with the...
3
by: Vidar Skjelanger | last post by:
I have a regex for matching VB6-functions, but it hangs on one specific function. The regex: ...
3
by: Urs Eichmann | last post by:
I have a console app which does it's job and frequently spits out status messages with Console.Writeline. I noticed that, if the user accidentally clicks into the black console window, the cursor...
1
by: IamtheEvster | last post by:
I'm working with a LAMP platform - PHP 5.1.4, MySQL 5.0.21, RedHat Enterprise 4... Running Sendmail 8.x. I'm using the PHP mail() function to send some confirmation emails out when a user...
11
by: Taras_96 | last post by:
Hi all, The PHP manual states that: "The Windows implementation of mail() differs in many ways from the Unix implementation. First, it doesn't use a local binary for composing messages but only...
13
by: RJ_32 | last post by:
looking here: http://www.devarticles.com/c/a/PHP/Getting-Intimate-With-PHPs-Mail-Function/2/ it says that I have to be careful about what I send to the sendmail process via popen(). Does that...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
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: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
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: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
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: 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.