RSS Feed
Via Email

Chat with Me
Dec 12

ASP.Net 1.1, ASP.Net 2, PHP 4 & PHP 5

ASP.Net, PHP, Windows Hosting  No Comments

Do you know that you can use ASP.Net 1.1, ASP.Net 2, PHP 4 & PHP 5 on your hosting account?

Yes, you can use ASP.Net 1.1, ASP.Net 2, PHP 4 & PHP 5 simultaneously. They are installed on all Windows servers. So if you have windows hosting account with us, you can now experiment with those 4 versions at the same time ;)

In order to use them, you must first select the version you want in your hosting control panel.

  1. Login to control panel and choose Web Options.
  2. If you have more than 1 domain then choose which domain you want.
  3. Change the version
    Change to ASP.NET2 & PHP5

That’s it. You can start playing with all 4 versions, which ever you want ;)

Nov 29

Bye Bye PHP Mail()

Email, PHP, Web Scripting  No Comments

Are you still using PHP mail() function to send email on your webpage? Guess it’s time to say bye bye :D

Why? Because mail() function will use the webserver to send email instead of a real mail server. However, we recently found out that the recipient mail server will check the sender IP and when it notices that the sender IP is not an email server, then it will block the message and the messages will never get through to recipient mailbox. This problem seems to be applicable to some email server (recipients’) such as Yahoo, AOL and other companies.

How to solve this problem? Easy, don’t use webserver to send email, but use a real email server with SMTP. If you’re using PHP, simply download phpmailer class and send email using SMTP.

Below is the code sample that you need to write on your webpage:

require(“class.phpmailer.php”);

$mail = new PHPMailer();

$mail->IsSMTP(); // send via SMTP
$mail->Host = “mail.yourdomain.com”; // SMTP servers
$mail->SMTPAuth = true; // turn on SMTP authentication
$mail->Username = “emailer@yourdomain.com”; // SMTP username
$mail->Password = “password”; // SMTP password

$mail->From = “from@yourdomain.com”;
$mail->FromName = “Sender’s name”;
$mail->AddAddress(“to@otherdomain.com”);

$mail->Subject = “subject here”;
$mail->Body = “message body here”;

if(!$mail->Send())
{
echo “Mailer Error: ” . $mail->ErrorInfo;
exit;
}

echo “Message has been sent successfully.”;

That’s it ;) You can even add more functionality such as HTML email, attachments, send to CC & BCC with simply add more properties to the mailer class and without having to worry about your mail got bounced back by some mail servers out there. Please refer to PHPMailer’s documentation for more info :)

And for those of you who are using wordpress then WP_Mail SMTP is the best plugin you need.