[ask] kirim email dari hosting via SMTP external


Status
Not open for further replies.
ini di server B.. pake gmail smtp pun juga ga bisa.
http://notifme.natakom.com/cek2.php

nah.. ini aku kasi lihat script php nya spy jelas dan mungkin bisa di coba di masing2 web hosting kalian..jalan atau tidak..

Code:
<?php
require("class.phpmailer.php");

$mail = new PHPMailer();
    $mail->SMTPDebug = 3;
    $mail->IsSMTP();                                      // set mailer to use SMTP
    $mail->Host = "smtp.gmail.com";  // specify main and backup server
    $mail->SMTPAuth = true;     // turn on SMTP authentication
    $mail->Port = 587;  
    $mail->SMTPSecure = 'tls';
    $mail->Username = "[email protected]";  // SMTP username
    $mail->Password = "xxxxxxxx"; // SMTP password
 
    $mail->From = "[email protected]";
    $mail->FromName = "NataNetwork - Hosting";
    $mail->AddAddress("[email protected]");


    $mail->WordWrap = 50;                                 // set word wrap to 50 characters

    $mail->IsHTML(true);                                  // set email format to HTML

    $mail->Subject = "ini email coba kirim";

        ob_start();
        include('template.php');
        print $mail->Body    = ob_get_contents();
        ob_end_clean();
 
    $mail->Send();

 


?>

silahkan dicoba..

note: harus ada file class.phpmailer.php dan class.smtp.php dulu dan ditaruk di 1 folder yg sama..

file bisa di download di sini: http://host.natanetwork.com/phpmailer.zip
 
Last edited:
entah kenapa saya jd ikut mikir keras baca ini
kok bisa2 nya ss dengan login fb si riau ada sama si TS
-_-
 
ternyata udah solved ya. td di trace dikit gak ada masalah sama firewall. ternyata..??
ah sudahlah biar TS yg jawab :p
 
Status
Not open for further replies.
Back
Top