Thursday, July 30, 2009

Cara Telnet pop3 110 dan SMTP 25

Berikut cata check email lewat telnet

POP3

telnet alamat_server 110
+OK POP3 server ready
USER miky
+OK miky's has 2 messages (320 octets)
LIST
+OK 2 messages (320 octets)
RETR 1
+OK 120 octets <the POP3 server sends message 1>
DELE 1
+OK message 1 deleted
QUIT
+OK mymailserver POP3 server signing off
QUIT <close connection>
<the server is waiting for next connection>


perintah yang bisa dipake


* USER <user anda, bisa juga email anda tergantung setting server>
* PASS <password anda>
* QUIT <mengakhiri>
* LIST [no_pesan] (untuk melihat pesan nomor tersebut)
* RETR [no_pesan] (mengambil pesan, pesan yang ingin diambil)
* DELE [no_pesan] (menghapus pesan, no pesan yang ingin dihapus)


pengiriman email SMTP 25


telnet alamat server 25

220 mailserver.domain.com

(tulis help untuk mengeluarkan pertolongan )

helo domain_pengirim.com
250 mailserver.domain.com Hello [10.1.11.133]
mail from:<pengirim@domain_pengirim.com>
250 2.1.0 pengirim@domain_pengirim.com....Sender OK
rcpt to:<penerima@domain_penerima.com>
250 2.1.5 penerima@domain_penerima.com
data
354 Start mail input; end with <CRLF>.<CRLF>
subject: subject test doang
to: penerima@domain_penerima.com
This is the text of my test mail.
.
250 2.6.0 <exchange.domain.com> Queued mail for delivery
quit

perhatikan pada pengakhiran yaitu pakai titik <.>

me(Suwidi)

Monday, July 27, 2009

Membuat Otomatis $config['base_url']

Pada saat develope kita sering merubah domain maupun directory, ini akan menyulitkan jika kita menggunakan CI (codeigniter)
berikut trik yang saya ambil dari klik

rubah configurasi seperti berikut

$config
['base_url'] = ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") ? "https" : "http");
$config
['base_url'] .= "://".$_SERVER['HTTP_HOST'];
$config
['base_url'] .= str_replace(basename($_SERVER['SCRIPT_NAME']),"",$_SERVER['SCRIPT_NAME']);


Smoga bermanfaat
me(Suwidi)