Click here to Skip to main content
15,912,897 members
Home / Discussions / C#
   

C#

 
GeneralHELP! override OnPain, OnLayout and DoubleBuffer Pin
TheSebaster24-Feb-05 5:47
TheSebaster24-Feb-05 5:47 
Generallinking schema programatically Pin
Member 110614424-Feb-05 5:15
Member 110614424-Feb-05 5:15 
GeneralRegular expression mayhem Pin
Esmo200024-Feb-05 4:18
Esmo200024-Feb-05 4:18 
GeneralRe: Regular expression mayhem Pin
Michael Dunn24-Feb-05 6:09
sitebuilderMichael Dunn24-Feb-05 6:09 
GeneralRe: Regular expression mayhem Pin
Esmo200024-Feb-05 7:21
Esmo200024-Feb-05 7:21 
GeneralRe: Regular expression mayhem Pin
S. Senthil Kumar24-Feb-05 8:43
S. Senthil Kumar24-Feb-05 8:43 
GeneralRe: Regular expression mayhem Pin
Esmo200024-Feb-05 9:25
Esmo200024-Feb-05 9:25 
GeneralSending Emails - The "SendUsing" configuration value is invalid. Pin
MrEyes24-Feb-05 2:51
MrEyes24-Feb-05 2:51 
Hello all,

I have an application that attempts to send emails via an exchange server on another machine. The code I am using is as follows :

MailMessage aMessage = new MailMessage();				
aMessage.From = "johndoe@server.com";
aMessage.To = "janedoe@server.com";
aMessage.Subject = "Test Subject";
aMessage.Body = "Test Body";

System.Threading.Thread.Sleep(3000); //REQUIRED OR MAIL ATTACHMENT MAY FAIL
MailAttachment mat = new MailAttachment("c:\path\to\attachment\att.jpg")
aMessage.Attachments.Add(mat);
SmtpMail.SmtpServer.Insert(0, "SERVER IP ADDRESS");
SmtpMail.Send(aMessage);


60% of the time this code works, but on occasions I get the following exception thrown by the .Send

System.Runtime.InteropServices.COMException (0x80040220): The "SendUsing" configuration value is invalid.


After hunting around google for a while I am none the wiser as to a solution to this problem. Although I have made some code tweaks to match certain suggestions

Does anybody have any suggestions


post.mode = postmodes.signature;
SELECT everything FROM everywhere WHERE something = something_else;
> 1 Row Returned
> 42
GeneralRe: Sending Emails - The "SendUsing" configuration value is invalid. Pin
turbochimp24-Feb-05 12:06
turbochimp24-Feb-05 12:06 
Generalcannot pass a string through an object to an unmanaged VC++ dll Pin
grs_files24-Feb-05 2:29
grs_files24-Feb-05 2:29 
GeneralNeed Help - Game Menu programming. Pin
giggssux9224-Feb-05 1:48
giggssux9224-Feb-05 1:48 
GeneralRe: Need Help - Game Menu programming. Pin
exhaulted24-Feb-05 2:32
exhaulted24-Feb-05 2:32 
GeneralInformation about a streamed file embedded in a WebPage (WindowsMediaPlayer ActiveX) Pin
rwelte24-Feb-05 0:30
rwelte24-Feb-05 0:30 
GeneralSorting DataGrid Pin
Maqsood Ahmed24-Feb-05 0:21
Maqsood Ahmed24-Feb-05 0:21 
GeneralRe: Sorting DataGrid Pin
turbochimp24-Feb-05 12:07
turbochimp24-Feb-05 12:07 
GeneralRe: Sorting DataGrid Pin
Maqsood Ahmed24-Feb-05 20:20
Maqsood Ahmed24-Feb-05 20:20 
GeneralRe: Sorting DataGrid Pin
turbochimp25-Feb-05 3:02
turbochimp25-Feb-05 3:02 
GeneralRe: Sorting DataGrid Pin
Maqsood Ahmed26-Feb-05 3:54
Maqsood Ahmed26-Feb-05 3:54 
GeneralRe: Sorting DataGrid Pin
turbochimp2-Mar-05 2:34
turbochimp2-Mar-05 2:34 
GeneralShortcut targets Pin
exhaulted23-Feb-05 23:40
exhaulted23-Feb-05 23:40 
GeneralCustom toolbar in Excel Pin
sharathgowda23-Feb-05 22:07
sharathgowda23-Feb-05 22:07 
GeneralRe: Custom toolbar in Excel Pin
Esmo200024-Feb-05 4:09
Esmo200024-Feb-05 4:09 
GeneralHelp me step by step create a ebook reader Pin
Nguyễn Đình Quân23-Feb-05 21:35
Nguyễn Đình Quân23-Feb-05 21:35 
GeneralRe: Help me step by step create a ebook reader Pin
Colin Angus Mackay23-Feb-05 23:32
Colin Angus Mackay23-Feb-05 23:32 
GeneralRe: Help me step by step create a ebook reader Pin
Nguyễn Đình Quân24-Feb-05 17:34
Nguyễn Đình Quân24-Feb-05 17:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.