Go Smart with REAR (pRay, rEad, leArn, tRy)

11/28/2016

LEARNING VB.NET (WITH SQLSERVER AS DATABASE) PART.1

5:35 PM Posted by Vandaime No comments
First of all, we need to create a connection module which serve to connect the data manipulation that we create in VB.NET connected with the database that we created before. This is the script:

Imports System.Data.SqlClient
Imports System.Data

Module Connection
          Public koneksi As SqlConnection = New SqlConection (My.Settings.ConnectionStringApp)
          Public con As SqlConnection
          Public cmd As SqlCommand
          Public str, username, password As String
          Public da As SqlDataAdapter
          Public ds As DataSet
          Public dr As DataReader
          Public dt As New DataTable

          Sub koneksi_DB()
                 STR = "Data Source=.\tr45h; Initial Catalog=nilaiSiswa; User Id=sa; Password=*******"
                 con = New SqlConnection(STR)
                 If con.State = ConnectionState.Closed Then
                    con.Open()
                 End If
          End Sub
End Module

And then, add new form to be used as a login form. 

11/17/2016

SENDING EMAIL USING TELNET

6:29 PM Posted by Vandaime No comments


The first thing to do is to open connection from your computer to your mail server. Type like this:
telnet [your.mail-server.domain] [port]
telnet test.mail.com 25
[Enter]

You should receive a reply like this:
Trying test.mail.com...
Connected to test.mail.com.
Escape character is '^]'.
220 test.mail.com ESMTP MAIL Service ready at [Day], [Date] [Hour] [TimeZone]

Then, declare you're sending the email from. Type like this:
HELO [your.local.domain]
HELO local.domain.com
[Enter]

You should receive a reply like this:
250 test.mail.com Hello [IP local.domain.com]

Now, give your email address. Type like this:
mail from: mail@your.mail-server.domain
mail from: vandaime@test.mail.com
[Enter]

You should receive a reply like this:
250 2.1.0 Sender OK

Now, give the recipients address. Type like this:
rcpt to: mail@domain.external
rcpt to: yondaime@goblog.com
[Enter]

You should receive a reply like this:
250 2.1.5 Recipient OK

And then, to start composing the message. Type like this:
data
[Enter]

You should receive a reply like this:
354 Start mail input; end with .

If you want a subject for your mail. Type like this:
subject: [type your subject here]
subject: Trial Sending Email
[Enter]
[Enter]

You may now proceed to type the body of your message. I type the message like this:
Dear Me,
[Enter]
I write this post just to remembering my self about this step.
[Enter]
Thanks.
[Enter]
Regards,
[Enter]
Vandaime
[Enter]

And it's important !!! To tell the mail server that you have completed the message. Type like this:
.
[Enter]

Yup, just type a single "."

You should receive a reply like this:
250 2.6.0 <[UNID]@your.mail-server.domain> Queued mail for delivery
or
250 2.0.0 <[UNID]@your.mail-server.domain> Message accepted for delivery

Done. Congratulation. And then you can close connection with type like this:
quit