Tuesday, June 1, 2010

site migrated

guys,

Thanks for visiting here.
I migrated this site to http://www.myhow2guru.com.
See you there.

Wednesday, September 3, 2008

Telnet mail server send email

Below is some instruction on how to testing your mail server using the telnet command. I found this is useful while you do some debugging on the mail server to send out email to others.

  1. Open a Command Prompt window
  2. Telnet to your mail server. Normally the port will be 110(Pop3) and 2
    telnet [yourmailserver] [port]

  3. Following is the example to connect SMTP server & try to send out email. Once successful telnet into your mail server, execute it (Red will be the command & the green is the reply). For the auth login command c2S2AxFuZHk= is user name (base 64 encoded) and the b2Y8IOdhdGE= is password (base 64 encoded) . You can encode your user name & password here.

    auth login
    334 VXNlcm5hbWU6
    c2S2AxFuZHk=
    334 UGFzc3dvcmQ6
    b2Y8IOdhdGE=
    235 2.7.0 Authentication successful.
    mail from: [SENDER EMAIL ADDRESS]
    250 2.1.0 [SENDER EMAIL ADDRESS]....Sender OK
    rcpt to: [RECEIPIENT EMAIL ADDRESS]
    250 2.1.5  [RECEIPIENT EMAIL ADDRESS]
    data
    354 Start mail input; end with .
    subject:testing
    testing email from XXXXXX
    .250 2.6.0 Queued mail for delivery

    quit
     

Wednesday, May 28, 2008

Zend studio slow performance














I am using Zend Studio 5.5 as a development tools to debug & complete my project.
Always found that the Zend Studio has slow performance issue while performing some debugging action. It always allocate a lots of Memory & CPU usage for its process (look picture below).


Previously, I did try to turn off the "Use OS Look & Feel" option inside the preference. It is increasing the performance. But today, I found that the slow performance issue is coming & I really cant take it anymore. So, I look for some forums & articles for the slow performance for Zend Studio.

Finally I found something is useful & try it out. Then I feel that it is faster than before although it is still slow performance at some time.

Below is the solution:

Sorry for the vauge necro-post here, but I've managed to find a solution to the problem.

1. Download the JRE v1.6 from sun: http://java.sun.com/javase/6/download.jsp
2. Install
3. Open the ZDE.lax file, located at: C:\Program Files\Zend\ZendStudioClient-5.1.0\bin
4. Locate: lax.nl.current.vm=..\\jre\\bin\\java.exe , and comment out this line with a preceding "#", or delete it.
5. Create a new line after the commented onecontaining the following: lax.nl.current.vm=C:\Program Files\Java\jre1.6.0\bin (assuming that is the path to the Java directory).
6. Save ZDE.lax and close it.
7. Launch ZDE.

Made a massive difference on mine; with no need to turn OS Look & Feel off.

Grab from invisionpower.
Your guys if facing the same problem, may try this out!

P.s : I found that the Zend Studio 5.5 is best suit to JRE 1.5.0_12 version. The memory allocation only 150+mb.

Tuesday, May 27, 2008

Sending email using Oracle procedures.

This is a post to share that how to sending out email by using oracle procedures. Some of the time. As a developer, I would like this receive some notification email from my procedures, so that I could know that the procedures is running & how many records had been update/inserted.

Below is the same procedures coding.
CREATE OR REPLACE
PROCEDURE TEST
AS
l_mailhost VARCHAR2(64) := '
';
l_from VARCHAR2(64) := 'XXXXX';
l_to VARCHAR2(64) := 'XXXXX';
l_mail_conn UTL_SMTP.connection;

BEGIN
l_mail_conn := UTL_SMTP.open_connection(l_mailhost, 25);
UTL_SMTP.helo(l_mail_conn, l_mailhost);

-- For Authenication
UTL_SMTP.command(l_mail_conn,'AUTH LOGIN');
UTL_SMTP.command(l_mail_conn, UTL_RAW.CAST_TO_VARCHAR2(
UTL_ENCODE.BASE64_ENCODE(
UTL_RAW.CAST_TO_RAW('
USERNAME')
)
));
UTL_SMTP.command(l_mail_conn, UTL_RAW.CAST_TO_VARCHAR2(
UTL_ENCODE.BASE64_ENCODE(
UTL_RAW.CAST_TO_RAW('PASSWORD
')
)
));
-- For Authenication

UTL_SMTP.mail(l_mail_conn, l_from);
UTL_SMTP.rcpt(l_mail_conn, l_to);

UTL_SMTP.open_data(l_mail_conn);

UTL_SMTP.write_data(l_mail_conn, 'Date: ' || TO_CHAR(SYSDATE, 'DD-MON-YYYY HH24:MI:SS') || utl_tcp.CRLF);
UTL_SMTP.write_data(l_mail_conn, 'From: ' || l_from || utl_tcp.CRLF);
UTL_SMTP.write_data(l_mail_conn, 'Subject: ' || 'test' || utl_tcp.CRLF);
UTL_SMTP.write_data(l_mail_conn, 'To: ' || l_to || utl_tcp.CRLF);
UTL_SMTP.write_data(l_mail_conn, '' || utl_tcp.CRLF);

UTL_SMTP.write_data(l_mail_conn, 'test');

UTL_SMTP.close_data(l_mail_conn);

UTL_SMTP.quit(l_mail_conn);
END TEST;