Loading

Php နဲ့ ဂ်ီေမးပို့နည္း - Sending Email using Gmail from Php (Hello World!)

Php နဲ့ ဂ်ီေမးပို့နည္း Sending Email using Gmail from Php (Hello World!)

$user=$from="[email protected]"
$to="[email protected]"
$passwd="[email protected]'s password"

require_once 'Mail.php';

$params = array(
'host'=> 'tls://smtp.gmail.com','port'=> 465,'auth'=> true,'debug'  => false,
'username' => $user,
'password' => $passwd
);

$smtp = Mail::factory('smtp', $params);
$smtp->send($to, array('From'=>$from,'To'=>$to), "Hello World!");

# Be Good, Don't be Evil :-)

Cheers,
Mark

3 comments:

SOETHIHA said...

ကိုမာခ့္ ေရ မွတ္သား နာယူသြားပါတယ္ :)

Regards,


SOETHI

Nanda said...

Thanks 4 Sharing :)

Ye Lin Htun said...

Hi..
Class 'Mail' not found error တက္ေနတယ္

က်ေနာ္ဖတ္ေသာ အျခား ဘေလာ့ / ဆိုဒ္မ်ား