Devilzc0de Forum Follow @devilzc0de
  • Home
  • Hacking
  • Networking
  • Programming
  • O.S
  • Server
  • Tweets
  • Search
  • Member List
  • Calendar
Current time: 05-22-2013, 09:24 PM Hello There, Guest! (Login — Register)
Devilzc0de Forum › Information Technology › Server › Mail server
[Ask] E-mail local di kirim ke internet

Home General Computer Multimedia Business Lounge

Post Reply 
Tweet
Threaded Mode | Linear Mode
Ask E-mail local di kirim ke internet
01-13-2012, 11:25 PM
Post: #1
easy2study Offline
./Devilz Commander
Posts: 317
Joined: May 2011
Reputation: 5
E-mail local di kirim ke internet
Langsung sja saya mau nnya klo kita mau mengirim email dari server local ke internet bagaimana ya , implementasinya menggunakan postfix pada linux ..
apa konfigurasi yang di tambahkan ??

contoh : misalkan saya punya user : user@example.top ingin mengirim email ke sample@gmail.com ..agar pesan tersebut terkirim lalu bagaimana pengaturannya pada si mail servernya itu yang menggunakan postfix ..terima kasih mantap
Visit this user's website Find all posts by this user
Quote this message in a reply
01-14-2012, 12:14 AM
Post: #2
Killu4 Away
./Devilz Advisor
Posts: 744
Joined: Nov 2011
Reputation: 16
RE: E-mail local di kirim ke internet
Quote:implementasinya menggunakan postfix pada linux

Waduh ane krg ngerti om,tunggu para om Linux turun gunung aja deh ntar pasti di bantuin ..
Ane bantu sundul aja om ketawa
Find all posts by this user
Quote this message in a reply
01-14-2012, 05:04 PM
Post: #3
anbu Offline
Naevy LunnyamouR
****
Global Moderators
Posts: 3,297
Joined: Feb 2010
Reputation: 52
RE: E-mail local di kirim ke internet
(01-13-2012 11:25 PM)easy2study Wrote:  Langsung sja saya mau nnya klo kita mau mengirim email dari server local ke internet bagaimana ya , implementasinya menggunakan postfix pada linux ..
apa konfigurasi yang di tambahkan ??

contoh : misalkan saya punya user : user@example.top ingin mengirim email ke sample@gmail.com ..agar pesan tersebut terkirim lalu bagaimana pengaturannya pada si mail servernya itu yang menggunakan postfix ..terima kasih mantap

implementasikan post fixnya ?

kalo ane biasanya tingal di install om post fixnya

pake apt-get install postfix or download postfix yang tipenya .deb terus di dpkg

ane kasih contoh file mail sendnya aja niee yah om
ini script ane gunain buat kotak saran & pertnyaan

kode keseluruhannya

Code:
<?php
//If the form is submitted
if(isset($_POST['submit'])) {

    //Check to make sure that the name field is not empty
    if(trim($_POST['contactname']) == '') {
        $hasError = true;
    } else {
        $name = trim($_POST['contactname']);
    }

    //Check to make sure that the subject field is not empty
    if(trim($_POST['subject']) == '') {
        $hasError = true;
    } else {
        $subject = trim($_POST['subject']);
    }

    //Check to make sure sure that a valid email address is submitted
    if(trim($_POST['email']) == '')  {
        $hasError = true;
    } else if (!eregi("^[A-Z0-9._%-]+@[A-Z0-9._%-]+\.[A-Z]{2,4}$", trim($_POST['email']))) {
        $hasError = true;
    } else {
        $email = trim($_POST['email']);
    }

    //Check to make sure comments were entered
    if(trim($_POST['message']) == '') {
        $hasError = true;
    } else {
        if(function_exists('stripslashes')) {
            $comments = stripslashes(trim($_POST['message']));
        } else {
            $comments = trim($_POST['message']);
        }
    }

    //If there is no error, send the email
    if(!isset($hasError)) {
        $emailTo = 'alkesprodisalkes@yahoo.com'; //Put your own email address here
        $body = "Name: $name \n\nEmail: $email \n\nAlamat: $subject \n\nPertanyaan:\n $comments";
        $headers = 'From: '.$name.'<'.$email.'>' . "\r\n" . 'Reply-To: ' . $email;
        $subjecto= 'Pertanyaan Tentang Aplikasi Registrasi Online';

        mail($emailTo, $subjecto, $body, $headers);
        $emailSent = true;
    }
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
    <title>Pertanyaan</title>
    <meta http-equiv="content-type" content="text/html;charset=utf-8" />
    <meta http-equiv="Content-Style-Type" content="text/css" />

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script>
<script src="jquery.validate.pack.js" type="text/javascript"></script>

<script type="text/javascript">
$(document).ready(function(){
    $("#contactform").validate();
});
</script>

<style type="text/css">
body {
    font-family:Arial, Tahoma, sans-serif;
}
#contact-wrapper {
    width:430px;
    border:1px solid #e2e2e2;
    background:#f1f1f1;
    padding:20px;
}
#contact-wrapper div {
    clear:both;
    margin:1em 0;
}
#contact-wrapper label {
    display:block;
    float:none;
    font-size:16px;
    width:auto;
}
form#contactform input {
    border-color:#B7B7B7 #E8E8E8 #E8E8E8 #B7B7B7;
    border-style:solid;
    border-width:1px;
    padding:5px;
    font-size:16px;
    color:#333;
}
form#contactform textarea {
    font-family:Arial, Tahoma, Helvetica, sans-serif;
    font-size:100%;
    padding:0.6em 0.5em 0.7em;
    border-color:#B7B7B7 #E8E8E8 #E8E8E8 #B7B7B7;
    border-style:solid;
    border-width:1px;
}
.style1 {font-size: 18px}
</style>
</head>

<body>

<div>
  <p align="left"><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="style1">&nbsp;&nbsp;&nbsp;TANYA JAWAB TENTANG PENGUNAAN </span></strong></p>
  <p align="left" class="style1"><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;APLIKASI REGISTRASI  PRODIS ALKES </strong></p>
</div>
    <div id="contact-wrapper">

    <?php if(isset($hasError)) { //If errors are found ?>
        <p class="error">Mohon isi field dengan benar. terima kasih.</p>
    <?php } ?>

    <?php if(isset($emailSent) && $emailSent == true) { //If email is sent ?>
        <p><strong>Pertanyaan Sudah Terkirim!</strong></p>
        <p>Terima kasih <strong><?php echo $name;?> </strong>. Pertanyaan anda akan segera kami balas melalui email.</p>
    <?php } ?>

    <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>" id="contactform">
        <div>
            <label for="name"><strong>Name:</strong></label>
            <input type="text" size="50" name="contactname" id="contactname" value="" class="required" />
        </div>

        <div>
            <label for="email"><strong>Email:</strong></label>
            <input type="text" size="50" name="email" id="email" value="" class="required email" />
        </div>

        <!--<div>
            <label for="subject"><strong>Alamat:</strong></label>
            <input type="text" size="50" name="subject" id="subject" value="" class="required" />
        </div>-->

        <div>
            <label for="message"><strong>Pertanyaan:</strong></label>
            <textarea rows="5" cols="50" name="message" id="message" class="required"></textarea>
        </div>
        <input type="submit" value="Kirim" name="submit" />
    </form>
    </div>
</body>
</html>

Fungsi emailnya
Code:
$emailTo = 'alkesprodisalkes@yahoo.com'; //Put your own email address here
        $body = "Name: $name \n\nEmail: $email \n\nAlamat: $subject \n\nPertanyaan:\n $comments";
        $headers = 'From: '.$name.'<'.$email.'>' . "\r\n" . 'Reply-To: ' . $email;
        $subjecto= 'Pertanyaan Tentang Aplikasi Registrasi Online';

        mail($emailTo, $subjecto, $body, $headers);
        $emailSent = true;
Visit this user's website Find all posts by this user
Quote this message in a reply
02-18-2012, 03:05 PM
Post: #4
yuens Offline
./Devilz 1st Cadet
Posts: 2
Joined: Feb 2012
Reputation: 0
RE: E-mail local di kirim ke internet
I didn't understand this is what meaning, I'm sorry. I come from China, English is not very good.
Find all posts by this user
Quote this message in a reply
02-22-2012, 09:08 PM
Post: #5
easy2study Offline
./Devilz Commander
Posts: 317
Joined: May 2011
Reputation: 5
RE: E-mail local di kirim ke internet
(02-18-2012 03:05 PM)yuens Wrote:  I didn't understand this is what meaning, I'm sorry. I come from China, English is not very good.

oke no problem , my english is not very good too haha

hmm .. the meaning is , how to send my email from the local users to the internet ?
my mail server use postfix .
Visit this user's website Find all posts by this user
Quote this message in a reply
« Next Oldest | Next Newest »
Post Reply 


Topic Tools
Topic Link :
BBCode :
HTML Code :
View a Printable Version Send Thread to a Friend Subscribe to this thread
Submit Google Submit Face book Submit to Digg Submit to Reddit Submit to Furl Submit to Del.icio.us Submit to Jeqq

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  [Ask] Masalah Mail di Outlook kid_1412 7 118 04-28-2013 09:24 AM
Last Post: greenhorn
  Mail Server dengan XAMPP On Windows Enerzy 6 1,556 04-18-2013 10:56 AM
Last Post: uzumady
  Membuat Nick E-mail Keren. patriot 25 7,468 02-07-2013 01:39 PM
Last Post: hakimoxz
Tongue [Tutor] Konfigurasi Mail Server di Debian 6 Squeezel sandimulyadi 8 547 12-04-2012 06:13 AM
Last Post: root31
  mail server dgn postfix+dovecot+squirrelmail ala wahyu debian 4 wahyu_devilzc0de™ 17 5,424 06-06-2012 08:24 AM
Last Post: dillahdejavu
  [Tutor] Install Mail Zimbra On Ubuntu ketem 6 664 05-17-2012 08:56 AM
Last Post: zenonk
  Mail ASIA PACIFIC JOURNAL OF CLINICAL NUTRITION fasthacker 4 1,893 06-12-2011 06:58 AM
Last Post: easy2study
  membuat mail server standart di linux debian wahyu_devilzc0de™ 8 3,943 06-12-2011 06:53 AM
Last Post: easy2study

Users Browsing
1 Guest(s)

  • Contact Us
  • devilzc0de
  • Return to Top
  • Mobile Version
  • RSS Syndication
  • Help
Current time: 05-22-2013, 09:24 PM Powered By MyBB, © 2002-2013 MyBB Group. Theme created by Justin S. | Mixed By Chaer.Newbie | Fixed By Aditya

USING THIS SITE INDICATES THAT YOU HAVE READ AND ACCEPT OUR TERMS. IF YOU DO NOT ACCEPT THESE TERMS, YOU ARE NOT AUTHORIZED TO USE THIS SITE