Issue while sending email using windows form application

Hi I'm trying to send an email by using Aspose Email for .Net sample code provided in one of your examples, i'm receiving an exception while debugging the code.

'windowsemailsend.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'windowsemailsend.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities\10.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'windowsemailsend.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'windowsemailsend.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'windowsemailsend.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'windowsemailsend.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities.Sync\10.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.Sync.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'windowsemailsend.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.Debugger.Runtime\10.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Debugger.Runtime.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'windowsemailsend.vshost.exe' (Managed (v4.0.30319)): Loaded '\\xxxxxx.com\userdatadfs\mrl03\v*******\my documents\visual studio 2010\Projects\windowsemailsend\windowsemailsend\bin\Debug\windowsemailsend.vshost.exe', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'windowsemailsend.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\assembly\GAC_MSIL\Aspose.Email\3.4.0.0__ad504e9f0d34714a\Aspose.Email.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'windowsemailsend.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'windowsemailsend.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'windowsemailsend.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Numerics\v4.0_4.0.0.0__b77a5c561934e089\System.Numerics.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'windowsemailsend.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Security\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Security.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'windowsemailsend.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_32\System.Web\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'windowsemailsend.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml.Linq\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.Linq.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'windowsemailsend.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Data.DataSetExtensions\v4.0_4.0.0.0__b77a5c561934e089\System.Data.DataSetExtensions.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'windowsemailsend.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.CSharp\v4.0_4.0.0.0__b03f5f7f11d50a3a\Microsoft.CSharp.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'windowsemailsend.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_32\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'windowsemailsend.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Deployment\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Deployment.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'windowsemailsend.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

The thread 'vshost.NotifyLoad' (0x1d88) has exited with code 0 (0x0).

The thread '' (0x9c4) has exited with code 0 (0x0).

The thread '' (0x3774) has exited with code 0 (0x0).

The thread 'vshost.LoadReference' (0x29a4) has exited with code 0 (0x0).

'windowsemailsend.vshost.exe' (Managed (v4.0.30319)): Loaded '\\xxxxxx.com\userdatadfs\mrl03\\my documents\visual studio 2010\Projects\windowsemailsend\windowsemailsend\bin\Debug\windowsemailsend.exe', Symbols loaded.

The thread '' (0x334c) has exited with code 0 (0x0).

A first chance exception of type 'Aspose.Email.Mail.SmtpException' occurred in Aspose.Email.dll

Please help me out...

Hi kriish,


Thanks for writing to us.

I have tried to reproduce this issue at my end using the latest version of Aspose.Email for .NET 3.4.0 but couldn’t face it as you mentioned. If you could please share a sample application that could help us reproduce this issue, it’ll help us investigate the issue quickly and assist you further. Also, please share your environment details (OS, .NET Framework, etc.) with us for our detailed analysis.

Environment: Visual Studio 2010

.Net Framework: 4.0(Used net2.0 dll and tried using net4.0 dll)

OS: Windows 2008 R2

Find the attachment with code. It's the example code you have provided in Examples section.

Hi Kriish,


Thanks for the feedback.

I have tested this issue with the mentioned environment and the emails are sent fine. I have attached a sample applicaiton here that I have used for my testing. Could you please run it at your end and let us know your feedback?