Wednesday, January 24, 2007

Articles

Interesting articles:

JavaScript with ASP.NET 2.0 Pages - Part 1
dotnetslackers.com

DATA POINTS
Revisiting System.Transactions
MSDN Article

SENDING EMAIL USING ASP.NET 2.0

Just thought to share my code which i used to implement a simple Mail System. Hope this might help you!

Imports System.Net.Mail

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles SendEmail.Click
Dim Msg As MailMessage = New MailMessage()
Dim MailObj As New SmtpClient
Try
Msg.From = New MailAddress(UsersEmail.Text, "Andy")
Msg.To.Add(New MailAddress("ammarfassy@gmail.com", "Author"))
MailObj.Host = "192.168.16.70"
MailObj.Port = 25
Msg.IsBodyHtml = "False"
Msg.Body = Body.Text
Msg.Subject = Subject.Text
MailObj.Send(Msg)
Label1.Text = "Email Sent!"
Catch ex As Exception
Label1.Text = ex.Message
End Try
End Sub

Add your IP Address (local) in your SMTP server & under the properies add the same IP address to Relay Restrictions (Grant & deny permissions to relay email through this SMTP virutal server).

The sent email will be a spam email!

extra notes on this:

under web.config under















namespace System.Net.Mail;

string UserName = System.Configuration.ConfigurationManager.AppSettings["smtpUsername"];
string Password = System.Configuration.ConfigurationManager.AppSettings["smtpPassword"];
string Host = System.Configuration.ConfigurationManager.AppSettings["smtpServer"]; string sFrom = "me@doman.com";
string sTo;
string sSubject = "sample subject";
string sBody = "sample html body";

string toAddress = "myaddress@someotherdomin.com,myaddress2@someotherdomin.com";
string msgSubject = sSubject;
string msgBody = sBody;

SmtpClient client = new SmtpClient(Host);
MailAddress from = new MailAddress(sFrom);
MailAddress to = new MailAddress(toAddress);
MailMessage message = new MailMessage(from, to);
message.Priority = MailPriority.High;
message.IsBodyHtml = true;

System.Net.NetworkCredential NTLMAuthentication = new System.Net.NetworkCredential(UserName, Password);
message.Subject = msgSubject;
message.Body = msgBody;
client.UseDefaultCredentials = false;
client.Credentials = NTLMAuthentication;
client.Send(message);

Friday, January 05, 2007

.NET Framework 3.0 is released!

The .NET Framework 3.0 has officially been released! You can download the .NET Framework 3.0 components here:

.NET Framework 3.0 Runtime Components
Windows SDK for Vista and the .NET Framework 3.0
Visual Studio 2005 Extensions for .NET Framework 3.0 (Windows Workflow Foundation)
Visual Studio 2005 Extensions for .NET Framework 3.0 (WCF & WPF), November 2006 CTP

Note, if you are using Windows Vista the .NET Framework 3.0 Runtime Components are installed by default.

Thursday, January 04, 2007

MAZDA 3




Monday, January 01, 2007

WELCOME 2007



Life is like having a cup of tea.
You sit by the side of the window, lift the cup and take a careless sip, Only to realize, somebody forgot to put the sugar. Too lazy to go for it you somehow struggle through the sugarless cup. Until you discover un-dissolved sugar crystal sitting at the bottom...
---That's Life---
I wish you Health...
So you may enjoy each day in comfort.
I wish you the Love of friends and family...
And Peace within your heart.
I wish you the Beauty of nature...
That you may enjoy the work of God.
I wish you Wisdom to choose priorities.. .
For those things that really matter in life.
I wish you Generousity so you may share...
All good things that come to you.
I wish you Happiness and Joy...
And Blessings for the New Year.
I wish you the best of everything.. .
That you so well deserve.

Happy New Year!