So, user can not add attachments >10 MB.
You can check the file size using FileInfo class:
long fileSize = new FileInfo(fileName).Length;
Please note that Base64 encoding, that email usually uses, makes all attachments ~37% bigger during transport
37% is the result of the MIME's 76 chars per line limitation, causing \r\n to be added every 76 chars.
I want to popup message if size of the mail exceeds 10 MB.
You can use IMail.Render() to get the raw bytes of the message. Length of the array is the actual email size.
Depending on your requirements it may be easier to sum actual attachment sizes (multiplied by 1.37 for Base64, XUUE and UUE encoded attachments: MimeData.ContentTransferEncoding)
2- Also let me know what is Maximum size I can attached with mail?
There is no limit, however please have in mind that base64 encoding that email uses makes all attachments 33% bigger.
3- Is there any limitation regarding to size in demo version of
Mail.dll?
There is no such limitation.