|
That isn't what we are here for: we are not a Google search assistant, and we don't provide full systems on demand.
Start with Google, and see where you get.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Do google for it
|
|
|
|
|
Hi,
I am trying to send a *.xlsx file as an email attachment in #c for that we write the below code
Attachment item = new Attachment(fileName.xslx,MediaTypeNames.Application.Octet);
item.TransferEncoding = System.Net.Mime.TransferEncoding.QuotedPrintable;
mail.Attachments.Add(item);
mail.IsBodyHtml =true;
mail.BodyEncoding =Encoding.UTF7;
mail.HeadersEncoding =Encoding.UTF7;
stmp.Send(mail);
By doing this in some machines we are able to send the mail successfully,but in some machines we are not able to send and also from those machines we are getting a mail with junk characters as body of the mail.
Please help us if anybody knows anything related to this(we are suspecting it might be machine settings problem,but we dont know what settings we need to change)
|
|
|
|
|
Don't create a duplicate thread - update your first one
=========================================================
I'm an optoholic - my glass is always half full of vodka.
=========================================================
|
|
|
|
|
Why are you using UTF7? That's probably the issue. You should be using UTF8.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Hi
We tried with UTF8 also that is also not working,but strangely as mentioned above even with UTF7 it is working on some machines
|
|
|
|
|
I have this C++ code for setting timeouts on serial port
COMMTIMEOUTS *timeouts = new COMMTIMEOUTS ;
memset(timeouts, 0, sizeof(COMMTIMEOUTS)) ;
timeouts->ReadIntervalTimeout = ReadIntervalTimeout ;
timeouts->ReadTotalTimeoutMultiplier = 5 ;
timeouts->ReadTotalTimeoutConstant = readTimeOut ; timeouts->WriteTotalTimeoutConstant = 0 ; timeouts->WriteTotalTimeoutMultiplier = 2*BaudRate/8 ;
const bool ret = SetCommTimeouts(*hDev, timeouts) != FALSE ;
delete timeouts ;
m_currentTimeOut = readTimeOut ;
I need to rewrite this in C#. For SerialPort class I found these properties:
_serialPort.ReadTimeout = 500;
_serialPort.WriteTimeout = 500;
Are they equivalent? It seems there are more parameters in play in the C++ code. How can I approach this? Or maybe other parameters are not needed? What is the best way to transform that C++ code to C#?
|
|
|
|
|
|
Not really, see on C++ there are more parameters about time out whereas on C# there is only 2. So it means I can't do exact mapping...?
|
|
|
|
|
user20044 wrote: whereas on C# there is only 2. Yes exactly, C# is a much easier language than C++ and is a high level language; whereas, C++ is a low-level language. C++ will likely always give equal to or greater control to the developer.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
|
user20044 wrote: and I need to rewrite this to C#. Yes, I understand that. And I'm telling you that C# does not expose all the same features that you can access in C++. So, either do it in C++ with the code you have or write it in C# and let the OS handle some of those properties for you that C++ does allow you to set.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
|
It all depends on what you are doing and what environment it is. If this is a windows application also written in C#, then yes, use the C#.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Original application is written in C++ (see for more code on the other question I linked above), and I need to rewrite to C#
|
|
|
|
|
Hi
I am new to C#, I wrote a code to prepare a *.xlsx file now I need to attach that file as an email attachment and send, but by doing that Thae mail body contains some junk data and also it is not giving any exceptions to catch.
Please help
|
|
|
|
|
Help with what? You haven't shown us the code that builds the email message so it's pretty much impossible to tell you what you did wrong.
|
|
|
|
|
|
Message Closed
modified 29-Sep-15 9:30am.
|
|
|
|
|
Hello!
i am working on Point of sale project. i am using devexpress for tile view in winform. how to create a dynamic Tile view and on click event i want to send category id and want to get the subcategory data. i tried alot but couldn't find any good solution.
PLEASE guide me SO I CAN MOVE FORWARD.
Thanks
|
|
|
|
|
Please read this post[^] then edit your question to provide more detail.
[EDIT - Note that I have suggested that you edit this post. Do not repost the same question yet again - see your earlier post[^]
This is twice you have been advised to post more detail. Help us to help you
|
|
|
|
|
Hi ,
i am creating pdf using iTextsharp dll , now i want some free/open source dll which will be a control to view the pdf in winform . I dont want any com component or webbrowser control to view . i need no dependencies too. I am finding it very challenging, can any help me with my RnD ?
|
|
|
|
|
Anthony Fernando wrote: i want some free/open source dll Then you need to post your requirements to Google.
|
|
|
|
|
|
Well, if you don't want any dependencies, you're going to have to rely on writing your own. There is a PDF specification but it's not a trivial thing to read, or implement. This article[^] shows you how many libraries you are going to have to replicate parts of.
|
|
|
|