Posted on: November 5th, 2008 Mail Functions in PHP and ASP

PHP - Using mail function in PHP is much simpler than ASP. But, the email always go to the junk/bulk/spam filter for some emails like Hotmail and MSN. Also, different with ASP, mail function in PHP doesn’t have the authentication for username and password for mail server.

// receiver email
$to = receiver@mail.com ;
// email subject
$subject = “This is for the mail subject”;
// email message
$message = “The message goes here”;
// email headers. kind of long, to prevent from spam filter.
// works for gmail and yahoo, still caught by hotmail and MSN.
// note: Cc and Bcc below are optional
$headers = “Return-path: “.”\n”;
$headers .= “Reply-to: “.”\n”;
$headers .= “Content-Type: text/html; charset=windows-1252\n”;
$headers .= “Content-Transfer-Encoding: 7bit\n”;
$headers .= “From: Email Sender “.”\n”;
$headers .= “Cc: name@mail.com”.”\n”;
$headers .= “Bcc: name@mail.com”.”\n”;
$headers .= “X-Priority: 3\n”;
$headers .= “X-Mailer: Some X-Mailer Version 2.01\n”;
$headers .= “MIME-Version: 1.0\n”;
$headers .= “\n\n”;

// if the mail sent
if(mail($to, $subject, $message, $headers))
{
echo “Message sent!!!.”;
}
// if mail not send
else
{
echo “Message not sent. Please make sure you’re not
running this on localhost and also that you
are allowed to run mail() function from your webserver”;
}

ASP - I wrote the mail function on a function, to use it just simply call the function. On ASP mail function, I included the METADATA, and it suppose to prevent the mail caught by spam filter. Also ASP mail function has authentication with username and password.

‘ call the function
call sendEmail(mail.domain.com, sender@mail.com, somePassword, sender@mail.com, receiver@mail.com, emailSubject, cc@mail.com, bcc@mail.com, sender@mail.com, emailMessage)

‘ the function. note the METADATA and the authentication with username and password
Sub SendEmail(SMTPServer, SendUserName, SendPassword, EmailFrom, EmailSendTo, Subject, SendCc, SendBcc, SendReplyTo, HTMLText)
%>

<!–
METADATA
TYPE=”typelib”
UUID=”CD000000-8B95-11D1-82DB-00C04FB1625D”
NAME=”CDO for Windows 2000 Library”
–>

<%
Set cdoConfig = CreateObject(”CDO.Configuration”)

With cdoConfig.Fields
.Item(cdoSendUsingMethod) = cdoSendUsingPort
.Item(cdoSMTPServer) = SMTPServer
.Item(cdoSMTPAuthenticate) = 1
.Item(cdoSendUsername) = SendUserName
.Item(cdoSendPassword) = SendPassword
.Update
End With

Set cdoMessage = CreateObject(”CDO.Message”)

With cdoMessage
Set .Configuration = cdoConfig
.From = EmailFrom
.To = EmailSendTo
.Subject = Subject
.Cc = SendCc
.Bcc = SendBcc
.ReplyTo = SendReplyTo
.HtmlBody = HTMLText
.Send
End With

Set cdoMessage = Nothing
Set cdoConfig = Nothing

End Sub

Filed under: ASP, PHP | No Comments »

Posted on: November 4th, 2008 Manual Settings for GPRS for Mobile Phones in Indonesia

XL GPRS
APN : www.xlgprs.net
User Name : xlgprs
Password : proxl

XL MMS
APN : www.xlgprs.net
User Name : xlmms
Password : proxl

IM3 GPRS
APN :www.indosat-m3.net
User Name : gprs
Password : im3

IM3 MMS
APN : mms.indosat-m3.net
User Name : mms
Password : im3

Mentari GPRS
APN : indosatgprs
User Name : indosat
Password : indosat

Mentari MMS
APN : mms.satelindogprs.com
User Name : satmms
Password : satmms

Matrix GPRS
APN : satelindogprs.com
User Name : (blank)
Password : (blank)

Matrix MMS
APN : mms.satelindogprs.com
User Name : satmms
Password : satmms

Telkomsel GPRS
APN : telkomsel
User Name : wap
Password : wap123

Telkomsel MMS
APN : mms
User Name : wap
Password : wap123

Telkomsel Flash (HSDPA)
APN : flash
User Name : (blank)
Password : (blank)

3 (three) GPRS
APN : 3gprs
User Name : 3gprs
Password : 3gprs

3 (three) MMS
APN : 3mms
User Name : 3mms
Password : 3mms

Filed under: Phones | No Comments »

Posted on: October 29th, 2008 Recover the corrupted .pst file for Microsoft Outlook

I am using PC (Windows) at work, and also use Microsoft Outlook for the email client. One day, I couldn’t open my outlook and it said that the data file is corrupted ( windows can’t handle me :-) ). After I checked the .pst file (the data file that actually stored/hold all emails, it usually named outlook.pst), the file reached more than 1 GB for the size. No wonder it’s that big, because I have been using outlook for my work email for the last 2 years (almost).

To recover it, i simply using SCANPST.EXE. the file is located under C:\Program Files\Microsoft Office\Office12. very easy to find and to use. Just double click the .exe file and follow through the instructions. If you have a big .pst file size like I did, the scan will be take a while. when you scan your .pst file, make sure that outlook is closed (do not open it).

-Bali Projects crew-

Filed under: PC | No Comments »

Posted on: October 29th, 2008 Your network settings have been changed by another application.

Probably you have experienced this on your MAC after you did an update and open the Network preferences. This annoying looping message is caused by the Security Update that Apple has released (Security Update 2008-006). Maybe Apple will fix this bug on the next Security Update. Hopefully.

But, no worries, to tackle this for temporary solution without have to fix it from the core, what you have to do is just click and hold the enter/return key on the keyboard and then move the cursor/mouse and try to click the lock icon on the bottom left corner. if it’s unlock, try to lock it, if it’s lock try to unlock it. It will asking you the admin password if you have set the admin password before. Then the annoying looping message should disappear, and you will be able to update your Network Preferences again.

Filed under: Mac | No Comments »