Below is the source code that will send email with attachment.
using System.Net.Mail;
MailMessage oMsg = new MailMessage();
oMsg.From = new MailAddress(”Email”, “Name”);
oMsg.To.Add(new MailAddress(”Email”,”Name”));
oMsg.Subject = “subject”;
oMsg.Body = “Mail contain”;
Attachment data = new Attachment(”File1″);
oMsg.Attachments.Add(data);
SmtpClient c = new SmtpClient(”SMTP”);
c.Send(oMsg);
oMsg.Dispose();
I have been facing problem with cannot delete my attachment from source. After troubleshooting, I found out that I forgot to put oMsg.Dispose(). Make sure you do so. ![]()
Related topics:
Email chinese character - C# source code
Do you ever face that your WordPress 2 visual editor gone in front of you? It just gone without any reason. It make my life hard because I have to use the HTML / code style to write a post. I searched for solution at Google. No hope at WordPress official support. Luckily, I found one. And it fix my case.
Just login to administration page. Select Users. Then select Your Profile tab. Click on ‘Use the visual editor when writing’ under Personal Options.
This should do the trick. You can also enable advanced toolbar with extra features. If this cannot help, then you need to use another method.
Related topics:
Get advanced toolbar from WordPress 2
Just use these simple shortcut key to bring them alive.
Windows Firefox: Alt+Shift+V
Windows Internet Explorer: Alt+V
Mac OS X Firefox: Ctrl+V
Then, you will get advanced toolbar as below. ![]()

Related topics:
WordPress 2 visual editor disappear… gone…
By using Google Analytics, you can get a full report of your website statistics. Below are some example that Google Analytics can do…
It is a great tool for webmaster to analysis their website. This is one of the must use tool in my web development list. ![]()
Wish to earn a lot of money while doing nothing? Simply sign up AdSense and AdBrite from below link buttons. And make the web earn money for you 24/7. =)
Related topics:
What is Nuffnang? Oh… It is a blog advertising community
Advertlets Review!