Search This Blog

Sunday, April 1, 2012

How to Send Email Using PHP (Source Code)

#1 function
mail ( string to, string subject, string message [, string additional_headers [, string additional_parameters]])

#2 example 01
<?
mail("admin@domainanda.com", "Hallo Dunia!", "Halo admin \n Apa Kabar \n Anda hari ini?" , , "From: Web <webmaster@domain-kirim.com>");
?>

#3 example 02
<? 
$kepada = "admin@domainanda.com";        //email tujuan 
$subject = "Hallo Dunia!";           //judul email 
$pesan = "Halo admin \n Apa Kabar \n Anda hari ini?";   //pesan 
$dari = "webmaster@domain-kirim.com";     //email account anda 
$from = "From: $dari"; 
     
mail($kepada,$subject,$pesan,$from);    //fungsi untuk kirim email 
?>

How to Make SMS Gateway Using Gammu and Wammu in Ubuntu

Gammu and Wammu. Gammu is Command line utility which allows to use all libGammu features and Wammu is GUI program to manage contacts, todos, calendar and messages in your phone.

#1 Gammu installation
type this command to install
sudo apt-get install gammu

#2 Gammu configuration
open terminal then type this command to detect the phone
dmesg

*result :

[ 807.511755] cdc_acm 5-1:1.0: ttyACM0: USB ACM device
[ 807.514290] usbcore: registered new interface driver cdc_acm
[ 807.514296] cdc_acm: v0.26:USB Abstract Control Model driver for USB modems and ISDN adapters

the port is ttyACM0

and then type
gammu-config

Related Posts Plugin for WordPress, Blogger...